riomigal

riomigal

Member Since 1 Month Ago

Experience Points
4,380
Total
Experience

620 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
34
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    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.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
4,380 XP
Sep
19
6 days ago
Activity icon

Replied to Trying To Perform Migration "Illuminate\Database\QueryException"

the table name is missing, in constructor set: $this->table = 'views'

Or hardcode it in the methods:

public function up() { $this->schema->create('views', function (Blueprint $table) { $table->bigIncrements('id'); $table->morphs('viewable'); $table->text('visitor')->nullable(); $table->string('collection')->nullable(); $table->timestamp('viewed_at')->useCurrent(); }); }

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::dropIfExists('views');
}
Activity icon

Replied to MethodNotAllowedHttpException In Laravel 8

Thats strange I did just upgrade few days ago from version 7 to version 8.

  1. Did you check your php version? Min. <7.3.0?

  2. Did you run "composer update" in your terminal after changing the composer packages versions? guzzlehttp/guzzle to ^7.0.1 facade/ignition to ^2.3.6 laravel/framework to ^8.0 laravel/ui to ^3.0 nunomaduro/collision to ^5.0 phpunit/phpunit to ^9.0

  3. Try to return just a string:

Route::get('/', function() { return 'asdf'; })->name('indexListing');

  1. If you are already using version 8 dont forget to change your routes:

Route::get('/posts', '[email protected]')->name('posts') ...

is not more working.

New:

Route::get('/posts', [PostController::class, 'index'])->name('posts');

Sep
18
1 week ago
Activity icon

Replied to MethodNotAllowedHttpException In Laravel 8

Try maybe to install a fresh laravel 8 version. The routing with a controller is different in version 8? But your code should normally work. Do you have maybe a view with a form inside?

Activity icon

Replied to MethodNotAllowedHttpException In Laravel 8

Hi I did just test your code in my application (Laravel 8) and it is working. Did you follow all steps when upgrading to Laravel 8?

https://laravel.com/docs/8.x/upgrade

Sep
16
1 week ago
Activity icon

Replied to How Do I Pass User_id For Updating Perpose In Admin Page?

Oh oops, I forgot the $ sign. You're welcome. ;)

Activity icon

Awarded Best Reply on How Do I Pass User_id For Updating Perpose In Admin Page?

In Controller Application.php:

public function edit($id) {

    $applications = Application::with('user')->find($id);

    return view('application.edit', compact('application'));
}

pass the application model: (You don't need to instantiate the Model.

public function update(Application application, Request $request) { $this->validate($request,[

        'status' =>'required',
    ]);

   
    $applications->status = $request->input('status');
    $applications->save();
   
    return redirect('/application/view')->with('Success', 'Status updated!');
}

In your blade view change:

In your route.php:

Route::put('/application/update/{application}', '[email protected]')->name('application.update')->middleware('is_admin');

Activity icon

Replied to How To Execute Function In App.js From A Livewire Component With Alpine.js?

Solved: Sry, just realized that the code is minified, so it can't find the function...

Activity icon

Replied to How Do I Pass User_id For Updating Perpose In Admin Page?

Sry, forgot the view snippet:

In your blade view change:

form class="form-horizontal" action="{{route('application.update', [$application])}}" method="POST" > @csrf @method('put')...

In your route.php:

Route::put('/application/update/{application}', '[email protected]')->name('application.update')->middleware('is_admin');

Activity icon

Replied to How Do I Pass User_id For Updating Perpose In Admin Page?

In Controller Application.php:

public function edit($id) {

    $applications = Application::with('user')->find($id);

    return view('application.edit', compact('application'));
}

pass the application model: (You don't need to instantiate the Model.

public function update(Application application, Request $request) { $this->validate($request,[

        'status' =>'required',
    ]);

   
    $applications->status = $request->input('status');
    $applications->save();
   
    return redirect('/application/view')->with('Success', 'Status updated!');
}

In your blade view change:

In your route.php:

Route::put('/application/update/{application}', '[email protected]')->name('application.update')->middleware('is_admin');

Activity icon

Started a new Conversation How To Execute Function In App.js From A Livewire Component With Alpine.js?

Hello,

I am trying to access functions in app.js from a livewire component with alpine.js "x-init".

For testing purposes I have this function in my app.js:

const sayHello = () => { alert('hello'); }

And in the livewire component:

I get this error: alpine.js:1834 Uncaught ReferenceError: sayHello is not defined

Sry, I am new in Javascript, how can I define the function before it is invoked?

Thank you!