DanielGG

DanielGG

Member Since 1 Year Ago

Experience Points 2,020
Experience Level 1

2,980 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 19
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

21 Jan
1 year ago

DanielGG left a reply on RuntimeException Session Store Not Set On Request.

Almost every route, except when the url doesn't contain any trailing slashes. Then I will get a different error:

Type error:

Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in vendor\laravel\framework\src\Illuminate\Support\Manager.php on line 88 and exactly 1 expected

    protected function createDriver($driver)
    {
        // We'll check to see if a creator method exists for the given driver. If not we
        // will check for a custom driver creator, which allows developers to create
        // drivers using their own customized driver creator Closure to create it.
        if (isset($this->customCreators[$driver])) {
            return $this->callCustomCreator($driver);
        } else {
            $method = 'create'.Str::studly($driver).'Driver';
 
            if (method_exists($this, $method)) {
                return $this->$method();
            }
        }
        throw new InvalidArgumentException("Driver [$driver] not supported.");
    }

DanielGG started a new conversation RuntimeException Session Store Not Set On Request.

Hi,

I was watching episode 19 from the Laravel 5.4 From Scratch series, when I got this error at around 15 minutes. I tried to undo most of the changes I made, but the error still persists. I've been stuck on this for a while now, and I would be really thankfull if someone could help me.

Here are some of my files (Please ask for more files if needed)

web.php

<?php
Route::get('/posts/create','[email protected]');
Route::get('/posts','[email protected]')->name('home');
Route::post('/posts','[email protected]');
Route::get('/posts/{post}','[email protected]');
Route::post('/posts/{post}','[email protected]');

//Route::get('/tasks','[email protected]');
//Route::get('/tasks/{task}','[email protected]');

Route::get('/register','[email protected]');

Route::post('/register','[email protected]');

Route::get('/login','[email protected]')->name('login');
Route::get('/logout','[email protected]');

PostsController:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Post;

class PostsController extends Controller
{

    public function __construct(){

        $this->middleware('auth')->except(['index','show']);
    }

    public function index()
    {

        $posts = Post::latest()->get();


    return view('posts.index',compact('posts'));

    }

    public function show(Post $post)
    {

    return view('posts.show',compact('post'));

    }

    public function create()
    {
        return view('posts.create');
    }

    public function store()
    {

        $this->validate(request(),[
            'title'=> 'required',
            'body' => 'required'

        ]);

        Post::create(request(['title',auth()->user()->id]));



       return redirect()->home();
    }


}


CommentController

<?php

namespace App\Http\Controllers;

use App\Post;
use App\Comment;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;


class CommentController extends Controller
{
    public function store(Post $post)
    {
        $this->validate(request(),['body'=>'required|min:2|max80']);
        $post->addComment(request('body'));

        return Redirect::back();
    }
}


RegistrationController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\user;


class RegistrationController extends Controller
{

    public function create()
    {
        return view('registrations.create');
    }

    public function store()
    {

        $this->validate(request(),[
            'name'=>'required',
            'email'=>'required|email',
            'password'=>'required|confirmed'
        ]);

        $user = User::create(request(['name','email','password']));

        auth()->login($user);

        return redirect()->home();

    }

}

SessionsController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class SessionsController extends Controller
{

    public function create()
    {
        return view('sessions.create');
    }


    public function destroy()
    {
        auth()->logout();

        return redirect()->home();
    }
}

16 Jan
1 year ago

DanielGG left a reply on BadMethodCallException With Message 'Call To Undefined Method Illuminate\Database\Query\Builder::incomplete()'

I was watching episode 7 of 'Laravel 5.4 from scratch', so I didn't yet know about query scopes. Besides, this may fix my problem, but I'm still wondering why I get that error

DanielGG started a new conversation BadMethodCallException With Message 'Call To Undefined Method Illuminate\Database\Query\Builder::incomplete()'

I get this error when I try to call the function incomplete from my Task model using tinker.

Code:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;



class Task extends Model
{
    public static function incomplete()
    {
        return static::where('completed','=',0)->get();
    }
}

Command i'm using in php artisan Tinker:

Can't seem to fix it