DanielGG

DanielGG

Member Since 1 Year Ago

Experience Points
2,020
Total
Experience

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-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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
2,020 XP
Jan
21
1 year ago
Activity icon

Replied to 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.");
    }

So yeah, I basically can't view a single page

Activity icon

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.

Error report:

"Session store not set on request."

In vendor\laravel\framework\src\Illuminate\Http\Request.php

Code:

    public function session()
    {
        if (! $this->hasSession()) {
            throw new RuntimeException('Session store not set on request.');
        }
 
        return $this->getSession();
    }

Application frames (1)

in Illuminate\Foundation\Http\Kernel handle

code:

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

Here are some of my files. I didn't include most of the files I didn't work on for a while. 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();
    }
}

Jan
16
1 year ago
Activity icon

Replied to 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

Thanks for the help though!

Activity icon

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:

App\Task::incomplete()

Can't seem to fix it