I am new to Laravel. I was practicing setting up a blog in Laravel 6. I have a layout.blade.php file where all the basic HTML is written. In the content section of the layout.blade file, I want to @…
Tag: laravel-6
What is the difference between a JsonResource & ResourceCollection? in Laravel v6 or v7
Can someone explain the difference between a ResourceCollection and JsonResource? In Laravel 6 docs you can generate 2 different types of resources… ResourceCollection and JsonResource. https://…
Html::style time out
everyone. I use laravel6 (v6.18.2), and run php artisan serve. I visit this page, then it display Maximum execution time of 60 seconds exceeded Here is my code : <!– something –…
command not being found even though I am registering it Laravel 6.x
So consider the service provider, yes I know I am registering this command in two places, but just give me a moment to explain:
Artisan::call(‘route:cache’) from within Laravel app, crashes
Quick summary: I need to programmatically clear the routes cache (unless there is another way using the RouteServiceProvider?) but Artisan::call(‘route:cache’); is throwing an error. I have routes …
Laravel 6.11: Shopping cart HasMany::fisrt() in Accessor not working
EDIT: typos corrected (made while translating some of the code) I’m building a shopping cart with Laravel 6.11 (MAMP). I am getting a couple of errors that are driving me nuts. Please help! First I’…
How to restrict a user to only see their own profile
I have a view (resources/view/front/auth/profile.blade.php) and my route in file web.php is: My problem is that when a user logs in and gets redirected to their own profile page (http://exmaple.com/profile/2), he/she can change the URL to http://exmaple.com/profile/3 and see other users’ profile. I want to use a middleware to check authenticated users id with URL parameter {user}. The $user->id will
Search is not working although item exists in DB
I am using laravel 6 : need user to find records by search bar, but it shows No Available Records enter image description here this in my model:Category model: public function scopeWhenSearch($query,…
Why is my validator is not validating in Laravel?
Why is my validator is not validating the input-email field, it accepts anything! This is my controller to update the database. The name in form is correct Edit: This is my entire code, I post here my code with just email but one guy said that is working, so why this is not working with my entire code of update
Laravel 6 with Nginx, php 7.4 fpm and mysql 8 on docker is slower than Laravel 4 on php 7.1
I have been working on a site built on Laravel 4.2 and on Php 7.1. Recently I have been trying to migrate the site to Laravel 6 with php 7.4 and mysql 8. I setup docker with the following settings. …