I am using `passport` in `laravel` for authenticating my users in APIs. I am able to authenticate different types of users from different tables and generating different token for them but the routes are not protected. For example. A user can access the routes like this Route::group(['middleware' => 'auth:api'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('get-seller-list','API\v1\SellersController@index'); }); }); and A doctor can access the routes like Route::group(['middleware' => 'auth:sellers'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('get-seller-detail','API\v1\TestController@getDetails'); }); }); but this `middleware` check doesn't seem to be working as I can access all the routes …

Member Avatar
Member Avatar
+0 forum 2

I get this message: The foto ktp must be an image. The foto ktp must be a file of type: jpg, jpeg, png. The foto profile must be an image. The foto profile must be a file of type: jpg, jpeg, png. I wonder why it does not pass the validation test? I already uploaded a jpg & jpeg file and they are images. I uploaded 180 KB jpeg & 30 KB jpg files. SellerController.php public function add(Request $request) { $this->validate($request, [ 'no_ktp' => 'required|numeric', 'foto_ktp' => 'required|image|mimes:jpg,jpeg,png|max:10000', 'foto_profile' => 'required|image|mimes:jpg,jpeg,png|max:10000' ]); $original_name_ktp = $request->file('foto_ktp')->getClientOriginalName(); $original_name_profile = $request->file('foto_profile')->getClientOriginalName(); $request->file('foto_ktp')->storeAs(null, $original_name_ktp, …

Member Avatar
Member Avatar
+0 forum 1

How to create a button that redirect to certain location in a website which is still on the same page?

Member Avatar
Member Avatar
+0 forum 5

Hi there been having this problem for a while now and i need guidance the only thing that is showing me only **111** when looping through i have 3 data in my database and its not showing me the result i want any ideas?? thanks in advance **edit** the result would be 1 2 3 not 1 1 1 $cruds = DB::table('cruds')->where('id', $id)->get(); $user_name = $request->Division; $users = DB::table('users')->where('division' ,$user_name)->get(); foreach($users as $key){ foreach($cruds as $cey => $name){ $user_id = $key->id; $cruds_id = $key->id; $cruds_owner = $cey->document_owner; $cruds_division = $key->division; $cruds_document = $cey->document; $cruds_year_release = $cey->year_release; $cruds_sharetoken = $cey->sharetoken; $cruds_privacy …

Member Avatar
+0 forum 0

Hello! I'm learning to program. I'm watching courses on how to create blogs in "laravel". I created an admin panel with the function of adding the article "form html". it is: title, description, text field - name is "section" I would like to add a button to add another "section". after clicking "add" will appear again: title, description, text field. after adding a few sections and publishing the article, each section would be a separate "row" with a class of 100% to be visible on the whole page. moving the mouse would move to the next section. unfortunately I do …

Member Avatar
+0 forum 0

Hello, I am trying to learn the basic of Installing CRUD Booster in Laravel. I wonder how to create the databases? I cannot understand the manual. http://crudbooster.com/doc/5.3/intro I am getting this error when trying to run: http://localhost/crudbooster/public/admin/login ErrorException (E_ERROR) SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select * from `cms_settings` where `name` = appname limit 1) (View: C:\xampp\htdocs\crudbooster\vendor\crocodicstudio\crudbooster\src\views\login.blade.php) What is the name of the database that I should I create ? Should I use the existing CRUDBooster Table Migration to create the tables? There are only two tables migrations in the existing CRUDBooster files: 1. create …

Member Avatar
Member Avatar
+0 forum 2

Hello, This is Laravel. After inputting the profile_info I wonder why after checking the dd($here) the result remains the same. I expect it to change the same just like the value that I input. setting.blade.php <div class="setting-box profile-open"> <form role="form" id="form_update_profile_info" method="post" action="{{action('AjaxController@postUpdateprofileInfo')}}"> <div class="form-group"> <div class="col-group"> <textarea style="height: 150px;" class="form-control" id="profile_info" name="profile_info">{{ $user_setting->info_profile }}</textarea> </div> </div> </form> </div> ... $(".setting-nav-save").click(function(e){ e.preventDefault(); var profile_info = $("#profile_info").val(); $.ajax({ type: "POST", url: '{{action("AjaxController@postUpdateprofileInfo")}}', dataType : "text", data : { profile_info : profile_info, }, success: function (response) { if (response!="error") { $("div.profile").show(); $(".setting-nav-save").hide(); $(".setting-nav-cancel").hide(); $(".setting-nav-edit").show(); $("div.profile-open").hide(); response = response.replace('"',' '); response = response.replace('"',''); …

Member Avatar
Member Avatar
+0 forum 1

Hello, I try to send auto mail through laravel using gmail yet getting this error: Swift_TransportException Connection could not be established with host smtp.gmail.com .env MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 MAIL_USERNAME=davy.yg1@gmail.com MAIL_PASSWORD=***** MAIL_ENCRYPTION=ssl MailController.php public function SendUndangan(Request $request) { $title = "Undang Saya"; $nama = $request->input('nama'); $telp = $request->input('telp'); $email = $request->input('email'); $subject = $request->input('subject'); Mail::send('email.undangan', ['title' => $title, 'nama' => $nama, 'telp' => $telp, 'email' => $email, 'subject' => $subject], function ($message) //use ($attach) { $message->from('davy.yg1@gmail.com', 'Admin Shaklee'); $message->to(['davy_yg@yahoo.com']); //Add a subject $message->subject("Undang Saya"); }); return redirect('undang'); } Any clue why?

Member Avatar
Member Avatar
+0 forum 1

I wonder why this minus (-) on one place is able to hide the content while the others unable to hide the content, like nothing happen. It has the same codes. You can check the button simulation in : http://fresway.com/ on the right top corner of the articles. apages.blade.php @extends('home') ... <a class="plus-minus-toggeler"><span class="glyphicon glyphicon-minus"></span></a> <div class="backend-box _grey backend-box-email"> articles.blade.php @extends('home') ... <a class="plus-minus-toggeler"><span class="glyphicon glyphicon-minus"></span></a> <div class="backend-box _grey backend-box-email"> This is part of the home blade in laravel. home.blade.php if (type == "article") { $('.placeholder-second').hide(); $('.placeholder-first').hide(); $(".backend-box").hide(); $(".content-gallery ").hide(); $("#artikel_placeholder").show(); $(".placeholder-third").hide(); $(".plus-minus-toggeler:not(.dont-hide)").hide(); } Any clue how to make the …

Member Avatar
Member Avatar
+0 forum 5

Hello, I am trying to understand someone else codes: articles.blade.php <div class="notes-nav"> <a href="#" class="btn btn-green btn-act-delete" onclick="deleteTimeLine(this)" data-id="{{$data->id}}" data-type="article"><img src="{{url('')}}/images//icon-trash.png"/></a> <a href="#" class="btn btn-green btn-act-edit" data-id="{{$data->id}}" data-tittle="{{$data->tittle}}" data-content="{{$data->content}}" ><i class="fa fa-pencil"></i></a> @if($data->status=="0") <a href="#" class="btn btn-green btn-publish" data-toggle="tooltip" data-placement="top" title="publish?" data-id="{{$data->id}}" data-status="1"><span class="glyphicon glyphicon-ok"></span></a> @else <a href="#" class="btn btn-green btn-publish" data-toggle="tooltip" data-placement="top" title="cancel publish" data-id="{{$data->id}}" data-status="0"><span class="glyphicon glyphicon-minus"></span></a> @endif </div> First I wonder why the a href = "#" is empty but you still can go to the next page when you click the button. Next, what is data-tittle="{{$data->tittle}}" and data-content="{{$data->content}}" for? Can you pass data using that? Also, …

Member Avatar
Member Avatar
+0 forum 2

Hello, I wonder how do you create auto send invoice everyyear as scheduled for each client that you have? Can you create such a program with laravel? Thanks.

Member Avatar
Member Avatar
+0 forum 1

Hello, This is laravel. Please help me fix the quotation so that my program works. <button type="button" onclick="window.location.href = 'route('pemesanan')';">Beli</button> If I click Beli (buy) it should run pemesanan (order) route. I don't think the route works correctly. please help me fix the quotation around the route. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

Call to undefined function routes() (View: C:\xampp\htdocs\Julmarice\framework\resources\views\soulfy\apages.blade.php) Why this is undefine? apages.blade.php <form action="{{ routes('navcolor') }}" method="post"> <div style="color: white;">Select Pages Navigation Color :</div> {{ csrf_field() }} <select name="NavColor"> <option value="black">Black</option> <option value="blue">Blue</option> <option value="gray">Gray</option> <option value="brown">Brown</option> </select> <input type="submit" value="Submit"><br><br> </form> routes.php Route::post('/home/navcolor', 'SettingController@postNavColor')->name('navcolor'); SettingController.php public function postNavColor(Request $request) { $domain = $_SERVER['SERVER_NAME']; $user = User::where('domain', $domain)->first(); $user_id = $user->id; $nav_color = $request->get('navcolor'); DB::table('user_profile')->where('user_id', $user_id) ->update(['nav_color' => $nav_color]); return view('/soulfy/apages'); }

Member Avatar
Member Avatar
+0 forum 5

Hello, This time I am having problem with html tag. pages.blade.php <section id="container"> <menu></menu> <cont> <center><b>{{ $pages2->pages_title }}</b></center><br> {!! $pages2->pages_content !!} </cont> <sidenav> @foreach( $pages as $p) <a href="{{url('')}}/home/pages/{{ $p->id }}">{{ $p->pages_name }}</a><br><br> @endforeach </sidenav> </section> If I let the html appears: {{ $pages2->pages_content }} This is the title and content. I wonder why when take the html tag out: {!! $pages2->pages_content !!} my sidenav start to jump inside the content? Li Europan lingues es membres del sam familie ` <p><img alt="" src="http://localhost/soulfy_repo/public_html/source/P6240673.jpg" style="height:478px; width:321px" /></p> <p> </p> <p>Li Europan lingues es membres del sam familie. Lor separat existentie es …

Member Avatar
+0 forum 0

Hello, I have two files with slightly different codes from two different programmer. Me and the other guy. And I would like to move part of the working feature from one file to the other codes. Any software that could compare php / laravel codes and highlight the difference? Something like: https://marketplace.visualstudio.com/items?itemName=DevartSoftware.CodeCompare but this is for C++ not php. Thanks.

Member Avatar
Member Avatar
+0 forum 12

I have developed Laravel application which allows dynamic subdomains. I mean single code for all tenants.each tenant will have separate database. But how can I setup crons for each subdomain?

Member Avatar
Member Avatar
+0 forum 2

Hello, I wonder why this code won't work: HomeController.php `$content = $email."\n".$phone."\n".$select; ` I expect that it goes to the next line after \n

Member Avatar
Member Avatar
+0 forum 6

Hello, I am trying to utilize facebook comment plugin: Cek this website that I created: http://julmarice.com/ this site consist of many articles. I wonder why after I add the fb comment plugin which is good for different articles it shows the same comments? I would like for different article should shows different comments. Any idea how to? home.blade.php <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/id_ID/sdk.js#xfbml=1&version=v2.10"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> index_v2.blade.php @extends('home') ... <div class="fb-comments" data-href="{{ $data->title }}" data-numposts="1" data-width="400"></div> I wonder why the …

Member Avatar
Member Avatar
+0 forum 1

Hello, I am trying to print html message: And when I print it out instead of showing the real message it shows me this: " Ini content baru 2 <br/> <br/> <br/> <br/> " I wonder how to make it shows the message only without the html codes.

Member Avatar
Member Avatar
+0 forum 2

Hello, I wonder why I keep failing saving data. I keep getting this message: "please fill the title and content article" - eventhough I already fill them in. article.blade.php <div class="backend-form create-article-form" style="display:none;"> <div class="form-top"> <div class="form-left"> <h4>Create Article</h4> </div> <div class="form-right"> <a href="#" class="btn-save-article setting_save"></a> <a href="#" class="btn-cancel-article setting_cancel"></a> </div> </div> <div class="form-body"> <div class="form-group"> <span>Tittle</span><input type="text" name="tittle" id="tittle" class="tittle" required/> </div> <div class="form-group"> <span>Content</span> </div> <textarea rows="10" maxlength="1000" id="content" class="content"></textarea> </div> </div> $(".btn-save-article").click(function(e){ e.preventDefault(); var tittle = $("#tittle").val(), content = $("#content").val(); $.ajax({ method: "POST", url: '{{action("AjaxController@postCreateArticle")}}', data: { tittle : tittle, content : content }, success: function (response) …

Member Avatar
Member Avatar
+0 forum 2

Hello, I am receiving this error message while trying to process the following javascript - "Error, the configuration is failed to save". What might be wrong? How to troubleshoot the javascript? partial/setting.blade.php function onSave(el) { var parent = $(el).closest("li"); var form = $(parent).find("form"); var editel = $(parent).find(".edit_form"); var beforeText = $(parent).find(".setting-nav2").html(); var options = { beforeSubmit: function () { var parent = $(el).closest("li"); var loading_gif = "<img width='24px' src='{{url('')}}/images/loading.gif'/>" $(parent).find(".setting-nav2").html(loading_gif); }, success: function (data) { $(editel).find("strong").html(data.message); cancel(parent); pesanOk("Configuration is saved successfully"); }, error: function (data) { try { var message = JSON.parse(data.responseText); if (message.message != "") { pesanErr(message.message); } else …

Member Avatar
Member Avatar
+0 forum 3

Hello, I wonder why I need to press F5 before entering the admin page after login. home_admin.blade.php <form class="navbar-form navbar-right" id="form_login" method="post" style="margin-top: 0;" action="{{ url('/auth/login') }}"> <input type="hidden" id="_token" name="_token" value="{{ csrf_token() }}"> <div class="form-group"> <span class="control-header">Email</span> <span><input type="text" name="email" placeholder="Email" required class="form-control"/></span> </div> <div class="form-group"> <span class="control-header">Password</span> <span><input type="password" name="password" placeholder="Password" required class="form-control"/></span> <input type="hidden" name="domain" required value="{{$domain}}"/> </div> <div class="form-group"> <h3 style="margin-top: 2px;"> <button type="submit" id="btn_login"><span class="glyphicon glyphicon-log-in" aria-hidden="true"></span> login </button> </h3> </div> <br> <a href="#" data-toggle="modal" data-target="#forgot_password" style="margin-top: -7px;float: right;margin-right: 90px;font-size: 10px;color: white;">Forgot Password?</a> </form> routes.php Route::controllers([ 'auth' => 'Auth\AuthController', 'password' => 'Auth\PasswordController', 'home'=>'HomeController', 'member'=>'MemberController', 'mail'=>'MailController', …

Member Avatar
Member Avatar
+0 forum 1

Hello, I am trying to print a web address in $url_link, which is the instagram web address but it does not print a correct web address format. Any idea why? home.blade.php <label for="c7"> @if($user_setting->instagram_enable) <?php if(Auth::check()) { $url_link = Url('home/instagram'); } else { $domain = $_SERVER['SERVER_NAME']; $user = User::where('domain', $domain)->first(); $user_profile = UserProfile::where('user_id', $user->id)->first(); $url_link = "www.instagram.com/".$user_profile->ig_url; }?> <a href="http://".<?php echo $url_link; ?> data-tipe="instagram" data-content="" data-target="#content_desc" target="_blank">

Member Avatar
Member Avatar
+0 forum 1

Hello, I am trying to create a checkbox in google chrome yet I receive a big checkbox. I wonder why? I only expect a normal size checkbox. <input type="checkbox" name="pic[{{$theme->pic_name}}]" value="{{$theme->pic_name}}"/>

Member Avatar
Member Avatar
+0 forum 1

Hello all, I have this code in laravel. I wonder how to keep the tab theme selected even after pressing purchase button (on the bottom) or refresh pages. Usually it changes to profile tab being selected after refresh page. Any clue? <section id="content-desc"> <a class="plus-minus-toggeler"><span class="glyphicon glyphicon-minus"></span></a> <div class="backend-box backend-box-email"> <div class="backend-nav"> <ul style="margin-top: 20px;height: 32px;" class="nav nav-tabs" role="tablist"> <li class="active"><a id="tab_setting" href="#setting" aria-controls="setting" role="tab" data-toggle="tab">Profile</a></li> <li ><a id="tab_account" href="#account" aria-controls="setting" role="tab" data-toggle="tab">Account</a></li> <li ><a id="tab_themes" href="#themes" aria-controls="setting" role="tab" data-toggle="tab">Themes</a></li> </ul> </div>

Member Avatar
Member Avatar
+0 forum 2

Hello, This is laravel. I wonder why after pressing, Upload Image button nothing happen. I doubt that it even pass the controller. Any clue? setting.blade.php <div id="myModal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title">Please input a new background</h4> </div> <form method="post" enctype="multipart/form-data" action="{{ URL::to('/home/upbprofile') }}"> <input type="hidden" name="_token" id="_token" value="<?php echo csrf_token() ?>"> <div class="modal-body"> <input type="file" name="b_pic"> </div> <div class="modal-footer"> <input type="submit" value="Upload Image" class="btn btn-primary" data-dismiss="modal"> </div> </form> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> routes.php Route::post('/home/upbprofile', 'SettingController@UploadBackgroundProfile'); SettingController.php public function UploadBackgroundProfile(Request $request) { $b_pic = $request->file('b_pic'); dd($b_pic); …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am trying to create an upload picture pop up but how? So when someone click the following button: <button type="button">Add background</button><br><br> An upload picture pop up appearing. How to create such a thing?

Member Avatar
Member Avatar
+0 forum 8

Hello, I am trying to create a space between line yet it does not work. It suppose to go to the next line. Instead of printing space it actually prints the html tag <br>. Any clue how to fix this problem? $content = "Someone purchase your picture".<br><br>; foreach ($request->input('pic') as $key => $value) { $content .= "$key : $value".<br>; }

Member Avatar
Member Avatar
+0 forum 5

Hello, I am trying to create a picture gallery with laravel: This is my blade: setting.blade.php @if(isset($themes)) @foreach($themes as $m) <tr> <td><img width="100px" height="100px" src="{{url('/')}}/uploads/theme/{{$m->pic_name}}.jpg"/></td> <td><img width="100px" height="100px" src="{{url('/')}}/uploads/theme/{{$m->pic_name}}.jpg"/></td> <td><img width="100px" height="100px" src="{{url('/')}}/uploads/theme/{{$m->pic_name}}.jpg"/></td> </tr> <tr> <td><div class="box"><input type="checkbox" name="pic" value=""></div></td> <td><input type="checkbox" name="pic" value=""></td> <td><input type="checkbox" name="pic" value=""></td> </tr> @endforeach @endif The above codes would show me a list of three of the same picture in a row and on the next row it changes the picture and again a list of three same picture. I would like each picture all would be different none are the same. How to …

Member Avatar
Member Avatar
+0 forum 2

Hello, I am trying to create a round circle with css with an image inside the circle. Yet, when I try to do so the circle turns out not perfectly round. I wonder why that happen? Check this out: www.fresway.com See the facebook button. This is the codes: #circle1 { background-color: #{{ \DB::table('menu')->where('menu_id', 1)->first()->menu_color }}; <!-- background-color: #9f7bfc; --> width: 60px; height: 60px; border-radius: 50%; text-align: center; } <div id="circle1"><div style="margin: 0 0 0 3px; "><img src="{{url("")}}/images/add/icons10.png" width="40px" /></div></div>

Member Avatar
Member Avatar
+0 forum 4

The End.