carlek

carlek

Member Since 2 Years Ago

Experience Points 300
Experience Level 1

4,700 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 0
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.

10 May
2 years ago

carlek left a reply on Redirection To Different Views

@bunnypro

My little big mistake,now works. Thanks

09 May
2 years ago

carlek started a new conversation Redirection To Different Views

Hello, I have only User table in my database with column position(employer,worker,accountant). I want to make redirection to different view by depending on the field in the database. I try to do this, in my controller:

public function index()
    {
        if (Auth::User()->position = "employer") {
            return view('adminpanel.admindashboard');
        }
        elseif(Auth::User()->postion = "worker")
        {
            return view('welcome');
        }
    }

But it always redirect me to adminpanel.admindashboard. Can You help me?

24 Apr
2 years ago

carlek left a reply on Forgot Your Password Doesn't Work

@Snapey No i didnt remove this from .env

carlek left a reply on Forgot Your Password Doesn't Work

I'm sorry that I write so late, but I was away. Yes i change it and configurated all :

  'driver' => env('MAIL_DRIVER', 'smtp'),
    'host' => env('MAIL_HOST', 'smtp.wp.pl'),
    'port' => env('MAIL_PORT', '465'),
    'from' => ['address' => 'wujekmirek98@wp.pl', 'name' => 'karol'],
    'encryption' => env('MAIL_ENCRYPTION','ssl'),
    'username' => env('MAIL_USERNAME', '####'),
    'password' => env('MAIL_PASSWORD', '####'),
    'sendmail' => '/usr/sbin/sendmail -bs',

    'pretend' => false,

];
20 Apr
2 years ago

carlek left a reply on Laravel 5.4MassAssignmentException In Model.php Line 225: _token

@mdecooman

Yes, I fixed it with you. You are great! Thanks :)

carlek started a new conversation Forgot Your Password Doesn't Work

Hello,

I have problem with standart option from auth which is 'Forgot Your Password', which is installed automatically with auth. I give the correct e-mail, after a while I get the information from the message was sent but in the mailbox it does not have. What could be wrong?

18 Apr
2 years ago

carlek left a reply on Laravel 5.4MassAssignmentException In Model.php Line 225: _token

@jekinney I know now, but after delete this nothing has changed. @mdecooman It looks better now : QueryException in Connection.php line 647: SQLSTATE[HY000]: General error: 1364 Field 'password' doesn't have a default value (SQL: insert into users (nameandsurname, PESEL, adress, position, email, leavesdays, updated_at, created_at) values (sdadas, dadsa, adsadsa, dsadsaads, dssadsadas, dsadsadsa, 2017-04-18 21:26:58, 2017-04-18 21:26:58))

carlek left a reply on Laravel 5.4MassAssignmentException In Model.php Line 225: _token

@mdecooman The same when i comment my @fillable : MassAssignmentException in Model.php line 225: _token

What do You mean at this sentence : "can you copy/paste here the use statements of your controller?". Sorry, my english is so bad :( Do you want me to copy all lines of the controller?

carlek left a reply on Laravel 5.4MassAssignmentException In Model.php Line 225: _token

@mdecooman

FatalThrowableError in Builder.php line 732: Type error: Argument 1 passed to Illuminate\Database\Eloquent\Builder::create() must be of the type array, null given, called in C:\Users\sekre\urlopy\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php on line 1329

carlek left a reply on Laravel 5.4MassAssignmentException In Model.php Line 225: _token

@mdecooman

FatalThrowableError in HomeController.php line 39: Call to a member function offsetUnset() on array

carlek left a reply on Laravel 5.4MassAssignmentException In Model.php Line 225: _token

@jbowman99

array:9 [▼ "_token" => "bWf3WcdXGY2uDqx5z9vBVO5Fg3MuBHG2BPXQFth4" "nameandsurname" => "sdadsa" "PESEL" => "dsadas" "adress" => "dsadsa" "position" => "saddsadsa" "email" => "sdadsa" "leavesdays" => "adsdsadsadsa" "password" => null "remember_token" => null ]

carlek left a reply on Laravel 5.4MassAssignmentException In Model.php Line 225: _token

@jbowman99 I tried it, That didnt solve the problem.

carlek started a new conversation Laravel 5.4MassAssignmentException In Model.php Line 225: _token

I was making a system wherein only administrator can adding users. I have a problem, becouse after filling the form I receives error who looks like : MassAssignmentException in Model.php line 225: _token

My Form:

           {!! Form::open(['url'=>'adminpanel/adduser/store','class'=>'form-horizontal']) !!}
            <div class="form-group">
                <div class="col-md-4 control-label">
                    {!! Form::label('nameandsurname','imie i nazwisko:') !!}
                </div>
                <div class="col-md-6">
                    {!! Form::text('nameandsurname', null, ['class' => 'form-control']) !!}
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-4 control-label">
                    {!! Form::label('PESEL','PESEL:') !!}
                </div>
                <div class="col-md-6">
                    {!! Form::text('PESEL',null,['class'=>'form-control']) !!}
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-4 control-label">
                    {!! Form::label('adress','adres:') !!}
                </div>
                <div class="col-md-6">
                    {!! Form::text('adress',null,['class'=>'form-control']) !!}
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-4 control-label">
                    {!! Form::label('position','stanowisko:') !!}
                </div>
                <div class="col-md-6">
                    {!! Form::text('position',null,['class'=>'form-control']) !!}
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-4 control-label">
                    {!! Form::label('email','email:') !!}
                </div>
                <div class="col-md-6">
                    {!! Form::text('email',null,['class'=>'form-control']) !!}
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-4 control-label">
                    {!! Form::label('leavesdays','liczbadniwolnych:') !!}
                </div>
                <div class="col-md-6">
                    {!! Form::text('leavesdays',null,['class'=>'form-control']) !!}
                </div>
            </div>


            {!! Form::hidden('password', null) !!}
            {!! Form::hidden('remember_token',null) !!}

This is User Model :

        use Notifiable;

/**

  • The attributes that are mass assignable.
  • @var array */

protected $fillable = [ 'nameandsurname', 'email','PESEL','adress','position','leavesdays',

]; protected $table = 'users'; /**

  • The attributes that should be hidden for arrays.

  • @var array */ protected $hidden = [ 'password', 'remember_token', ]; Request in controller :

        public function store(AddUserRequest $request)
        {
       //        User::create($request->except('_token'));
    

    $newUser = User::create($request->all()); $newUser->save();

    return redirect('/adminpanel/admindashboard'); } Migration:

    public function up() { Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('nameandsurname',40); $table->string('PESEL',9); $table->string('adress',30); $table->enum('position',array('employer','worker','accountant')); $table->string('email',100)->unique(); $table->string('password'); $table->integer('leavesdays'); $table->rememberToken(); $table->timestamps(); }); }

I was looking for this problem on the internet, but any suggestion helped me.