My profile picture doesn’t show in Laravel 6

I’m learning to create some forum, but when I update a photo profile, it can’t show. When I try to inspect element it says: “Failed to load resource: the server responded with a status of 404 (Not Found)” This is my Controller: public function update() { $avatar = request()->file(‘avatar’); $avatar_validate = ‘image|mimes:jpeg,png,jpg,svg|max:2048’; request()->validate([ ‘username’ =>…

Laravel Eloquent Query to 2 Million Rows takes long time

I have to pull data from a table that has 2 million rows. The eloquent query looks like this: $imagesData = Images::whereIn(‘file_id’, $fileIds) ->with(‘image.user’) ->with(‘file’) ->orderBy(‘created_at’, ‘DESC’) ->simplePaginate(12); The $fileIds array used in whereIn can contain 100s or even 1000s of file ids. The above query works fine in small table. But in production site…

Second summernote returns null in laravel

I’m trying to use two summernotes in the same laravel form but the value of the seconnd one returns null. It works with php but not laravel Here’s my code <textarea class=”js-summernote” id=”summernote” name=”details”></textarea> <textarea class=”js-summernote” id=”summernote” name=”content”></textarea> <!–script files –> <script src=””></script> <script src=””></script> <script src=””></script> <script> $(function () { //Init page helpers (Summernote…

Insert data from excel (xlsm,xls) in laravel (cyber-duck)

Currently I can get the json data from my excel file with format like this sample.xlsx $excel = Importer::make(‘Excel’); $excel->hasHeader(true); $excel->load($savePath.$fileName); $collection = $excel->getCollection(); if(sizeof($collection[1]) == 5) { return $collection; } else { return redirect() ->back() ->with([‘errors’=> [0=> ‘Please provide date in file according to your format.’]]) ->with(‘modal’,$modal); } output [{“id”:1,”first_name”:”j.doe17″,”last_name”:”Jun Doe”,”email”:”j.doe@gmail.com”,”birthdate”:{“date”:”1996-09-07 00:00:00.000000″,”timezone_type”:3,”timezone”:”Asia\/Taipei”}},{“id”:2,”first_name”:”j.doe18″,”last_name”:”Jun Doe”,”email”:”jan.doe@gmail.com”,”birthdate”:{“date”:”1996-09-07 00:00:00.000000″,”timezone_type”:3,”timezone”:”Asia\/Taipei”}}]…

Laravel 5.6 Auth Logout Fail

commerce with Laravel. I click the “Log Out” button, but the Exit Process does not work. I’m not getting any errors. He’s just leading me to the homepage. web.php Code Route::group([‘prefix’=>’kullanici’], function() { Route::get(‘/logout’, ‘KullaniciController@logout’)->name(‘kullanici.logout’); }); Controller Code use Illuminate\Auth; public function logout() { auth()->logout(); return redirect(‘/’); } Html Code <a class=”dropdown-item” href=”” >Çıkış Yap</a>

Undefined variable: in Laravel

i can’t get variable seat in form action at {!! Form::open([‘action’ => [‘SeatController@book’, $seat->id] , ‘method’ => ‘POST’])!!} to working. here is my code: blade.php: @extends(‘layouts.app’) @section(‘content’) <br><br><br> <h3>From to </h3> <div> Date : </div> <div> Boarding Time : </div> <div> Arrival Time : </div> <div> Plate Number : </div> <hr> <img src=”/images/seat.jpg” height=”175.5px” width=”521.5px”…