4,710 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Earned once your experience points ranks in the top 10 of all Laracasts users.
Replied to What Is The "singularized" Version Of The Resource Name ?
i am asked about before this...but i am not clear about it ... link... thanks for your time .
Replied to What Is The "singularized" Version Of The Resource Name ?
question-answer
and $questionAnswer
are same ? i am not clear about it ..
Replied to What Is The "singularized" Version Of The Resource Name ?
i run this command for model, migration, resource controller. php artisan make:model QuestionAnswer -mc -r
..
Route::resource('faq','QuestionAnswerController');
and Route::resource('question-answer','QuestionAnswerController');
I write both in web.php ..
public function edit(QuestionAnswer $questionAnswer) { // return $questionAnswer; }
'question-answer'
is work by default but faq
not working .. it's return null.. would you can explain difference between question-answer
and faq
... actually i am looking for this couple of day..
Replied to What Is The "singularized" Version Of The Resource Name ?
Your answer for a single word model... what about one more word... like UserRole
.... what will be by default param ?
Started a new Conversation What Is The "singularized" Version Of The Resource Name ?
Naming Resource Route Parameters
By default, Route::resource
will create the route parameters for your resource routes based on the "singularized" version of the resource name.
I am looking for explanation, example and source
Replied to How I Will Identify Resource Default Url In Laravel?
after running this command php artisan make:model QuestionAnswer -mc -r
.. I found edit function like this in QuestionAnswerController
controller:
public function edit(QuestionAnswer $questionAnswer) {// return $questionAnswer;}
if I write this line code in web.php Route::resource('question-answer','QuestionAnswerController')
; everything is okay...
but if I write this line code in web.php : Route::resource('faq','QuestionAnswerController');
i need to change in edit function variable($faq
) . that means my edit function will be like this
public function edit(QuestionAnswer $faq) {// return $faq; }
I think you understand difference between question-answer
and faq
url ...
So How will I know I need to write this line code Route::resource('question-answer','QuestionAnswerController');
? how i will identify resource default url in laravel ?
Replied to How I Will Identify Resource Default Url In Laravel?
@neilstee After running auth
command I find all route list … route:list
by this command..
But after running this command php artisan make:model QuestionAnswer -mc -r
I did not find QuestionAnswer
model route list …
if i write in web.php
this line Route::resource('question-answer','QuestionAnswerController');
everythink is okay but if I write in web.php
: Route::resource('faq','QuestionAnswerController');
i need to change in edit function
variable($faq
) .
How will I know I need to write Route::resource('question-answer','QuestionAnswerController');
?
how i will identify resource default url in laravel ?
Replied to How I Will Identify Resource Default Url In Laravel?
i don't want to change edit function ... but how i will know this question-answer
will work ? how can i find out by default or without changing edit function which url like means question-answer
work... how i will know i need to write question-answer
this line ?
Replied to How I Will Identify Resource Default Url In Laravel?
How will I know I need to write question-answer
this ? by default it works... when i write faq
i need to change in edit function
variable($faq
) .
How will I know by default url (question-answer) will work ..when php artisan route:list
command give us all route list.. and when I make model Category
laravel create table name categories
and follow grammar rules
Replied to How I Will Identify Resource Default Url In Laravel?
is there possible way to find out what exact url i will write ? how i will i figured it out ?
Started a new Conversation How I Will Identify Resource Default Url In Laravel?
i am run this command for model, migration, resource controller. php artisan make:model QuestionAnswer -mc -r
..
My Edit Function
public function edit(QuestionAnswer $questionAnswer) { // return $questionAnswer; return view('backend.faq.edit',get_defined_vars()); }
Route one
in web.php : Route::resource('faq','QuestionAnswerController');
in view : {{route('admin.faq.edit',$questionAnswer->id)}}
Route two
in web.php : Route::resource('question-answer','QuestionAnswerController');
in view: {{route('admin.question-answer.edit',$questionAnswer->id)}}
in Edit function for Route one : $questionAnswer
object return null. but for Route two : $questionAnswer
return object mean expected output ..
My Question
is there possible way to find out what exact url i will write ? .. like question-answer
.. or command line ...or how i will i figured it out ? i think there must be something..
EDIT
How will I know I need to write question-answer
this ? by default it works... when i write faq
i need to change in edit function
variable($faq
) .
How will I know by default url (question-answer) will work ..when php artisan route:list
command give us all route list.. and when I make model Category
laravel create table name categories
and follow grammar rules