skip to Main Content

How to count total results with ajax? – Laravel

Have a problem with total count of ajax searche's results. There is a mistake "Method IlluminateDatabaseEloquentCollection::total does not exist." if I use directive for example <div class="searched-item"> <a href="#" class="searched-item-res1">{{ __('main.res_found') }} {{$sfilms->total()}} {{ __('main.res_results') }}</a> </div> How to fix…

VIEW QUESTION

Pass variable to view via controller in Laravel

I need help with passing the variable I have initialized using __construct() to view in Laravel. Here is my controller code protected $profileInfo; public function __construct(){ $this->profileInfo = Profile::with('address')->where('id', '=', '1')->get(); } public function index(){ $this->profileInfo; return view('admin_pages.profile', compact('profileInfo')); }…

VIEW QUESTION

laravel selectpicker selected value reset to first value. why?

I have a selectpicker inside a table. I am passing the selected value into it but it shows the first value. why? <td> <select name="select[]" id="select" data-selected="224515" class="selectpicker form-control select" data-live-search="true" data-show-subtext="true" data-size="5" data-container="body" title="Search Parts.."> @foreach ($list as $p)…

VIEW QUESTION
Back To Top
Search