skip to Main Content

How to change index in Laravel Builder Eloquent

Is it possible to customize the index of array in Laravel Builder? I need the index is not incremented from 0 but with some integer This is my code: foreach ($members as $member) { $check[$member->id] = TransactionInNon::where('member_id', $member->id) ->whereYear('created_at', $year)…

VIEW QUESTION

How to clear the cache on laravel 9 server

Does any one know how to clear the cache on laravel -9 on server I tried it and it took me to a 404 error page Route::get('/clear', function() { Artisan::call('cache:clear'); Artisan::call('config:clear'); Artisan::call('config:cache'); Artisan::call('view:clear'); return "Cleared!"; }); and Route::get('clear',[SiteController::class,'clear']); public function…

VIEW QUESTION

Laravel Inertia Vue

I`m new to laravel and i try to do a crud tutorial but donesn t work the update method. This is the controller public function update(UserRequest $request, User $user) { $avatar = $user->avatar; if(Request::file('avatar')){ Storage::delete('public/'. $user->avatar); $avatar = Request::file('avatar')->store('users', 'public');…

VIEW QUESTION
Back To Top
Search