jzmwebdevelopment

jzmwebdevelopment

Member Since 3 Years Ago

Experience Points 4,330
Experience Level 1

670 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 3
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.

11 May
3 years ago

jzmwebdevelopment left a reply on Message Not Showing

@bashy How would you do 2?

Full controller:

    public function addNewUserSubmit(Request $request)
    {
       $fName       = Request::input('fname');
       $lName       = Request::input('lname');
       $email       = Request::input('email');
       $landline    = Request::input('landline');
       $mobile      = Request::input('mobile');
       $gender      = Request::input('gender');
       $dob         = Request::input('dob');
       $companyName = Request::input('companyName');
       $inputType   = Request::input('type');
       $password    = Request::input('password');
       $emailToUser = Request::input('emailToUser');

       $validatation = Validator::make(Request::all(), [

            'fname'       => 'required',
            'lname'       => 'required',
            'email'       => 'required|unique:users,email',
            'gender'      => 'required',
            'dob'         => 'required',
            'type'        => 'required',

        ]); 

       if($validatation->fails())
       {

        return redirect()->back()->with('alert-warning', $validatation->errors());

       }

       $passwordHash = Hash::make($password);

       $generateID = $this->idGenerator($inputType);

       $saveData = new User;

       $saveData->user_id      = $generateID;
       $saveData->f_name       = $fName;
       $saveData->l_name       = $lName;
       $saveData->email        = $email;
       $saveData->password     = $passwordHash;
       $saveData->landline     = $landline;
       $saveData->mobile       = $mobile;
       $saveData->gender       = $gender;
       $saveData->dob          = $dob;
       $saveData->company_name = $companyName;
       $saveData->type         = $inputType;

       $saveData->save();

       return redirect()->route("newUser")->with('alert-success', $fName . $lName . 'Was Successfully Added');
    }

Route:

Route::group(['middleware' => 'auth.admin'], function(){
        Route::post('users/new/add', '[email protected]');
    });

jzmwebdevelopment started a new conversation Message Not Showing

How come when I redirect I am not getting my success message I am wanting it so that I can just change the alert "var":

##HTML:

    <div class="flash-message">
        @foreach(['warning', 'success'] as $flashMsg)
            @if(Session::has('alert-' . $flashMsg))
                <p class="alert alert-{{ $flashMsg }}">{{Session::get('alert-' . $flashMsg)}}</p>
                @endif
        @endforeach
    </div>

##Controller:

       return redirect()->route("newUser")->with('alert-success', $fName . $lName . 'Was Successfully Added');

jzmwebdevelopment started a new conversation Select Menu Validation

If I have a select menu with "please select" and that has a value of "#". How can I make the php validation so that it errors when thats selected?

10 May
3 years ago

jzmwebdevelopment left a reply on Password Generator

@Prez was another idea but im sure there must be packages

jzmwebdevelopment started a new conversation Password Generator

I am creating a new user area and I am wanting to implement a "generate" button that will create me a secure password that could be then emailed when the form is submitted or just given to the person.

Is there a package available for this or what is the best way of action to build this?

07 May
3 years ago

jzmwebdevelopment started a new conversation Laravel Gulp Including A File Within .pipe

How can I include a file within the pipe so that they include and min into the app.min.js file?

jsSrc = 'resources/temp/*.js';//Your js source directory
jsDest = 'public/admin/js/';//Your js destination directory

// Make Minify JS

gulp.task('scripts', function(){
    return gulp.src(jsSrc)
           .pipe(concat('app.js'))
           .pipe(gulp.dest(jsDest))
           .pipe(rename('app.min.js'))
           .pipe(uglify())
           .pipe(gulp.dest(jsDest))
           .pipe(livereload());

});
01 May
3 years ago

jzmwebdevelopment left a reply on DB Update Issue

@Snapey Thanks and thats what I exactly trying to do. However my table is different now as I took your advice and created a column foreach input and I have got the values to update.

But only update after I placed a value into the database as the "ID" given in the route ` ``{{ route('socialDataSubmit', $siteSocialSettingsData->twitter)}}```

Would my best bet be to disable the auto int counter and then manually set an ID instead of the above then I could use firstOrNew() to check and save or insert if a value is found.

Code So Far:

       $colName         = Request::input('name');
       $value                 = Request::input('value'); 
       $updateValue  = SocialSettings::where($colName,$id)->update([$colName =>  $value]);

jzmwebdevelopment left a reply on DB Update Issue

@willvincent Thanks so much - I have been looking at the docs and reading a bit too far into them I think I can now see what I could of used etc. I have semi resolved it but ill explain that in the response to @Snapey

jzmwebdevelopment started a new conversation Call To A Member Function Save() On Integer

Why am I getting Call to a member function save() on integer

       $currentValue = Request::input('currentValue');

       $value        = Request::input('value'); 

       $updateValue = SocialSettings::where($id,$id)->update([$currentValue =>  $value]);

       $updateValue->save();
30 Apr
3 years ago

jzmwebdevelopment left a reply on DB Update Issue

@d3xt3r

Can you give me an example as I come from a CI background still trying to get the grasp

jzmwebdevelopment started a new conversation DB Update Issue

I cant seem to get my code working 100%. I am trying to get my code to work in a way like this:

if the column value is empty ($id = columnName) then insert into that row. If there is a "value" found for that $id then update the value already saved in the DB.

Function:

     $socialCheck = SocialSettings::where($id)->first();

       $socialInsert = new SocialSettings;

       $value        = Request::input('value'); 


       if(SocialSettings::where_not_null($id)){

           $socialInsert->$id = $value;
           $socialInsert->save();
   }else{
        $socialCheck->update($value);

   }

    }

jzmwebdevelopment left a reply on Using Isset Within Controller

@Snapey These are in the websites general settings so they have no relationship to users. The general/social settings is in the admin panel of the website I am building so they relate to the "website"

jzmwebdevelopment left a reply on Using Isset Within Controller

@Snapey

id int(10) unsigned NOT NULL AUTO_INCREMENT, socialName varchar(255) COLLATE utf8_unicode_ci NOT NULL, socialLink varchar(255) COLLATE utf8_unicode_ci NOT NULL, created_at timestamp NULL DEFAULT NULL, updated_at timestamp NULL DEFAULT NULL, PRIMARY KEY (id)

jzmwebdevelopment left a reply on Using Isset Within Controller

@Snapey You have hit the nail on the head. I have tried to think of a way to cut down on coding for huge blocks of code. I have come up with the following however I am a bit on edge about the security aspect.

How my code works is that I have set a name value in the html input and then that becomes the "socialName" in the database and the input value becomes the "socialLink"

So now you can see why I have the Twitter code the way I have it - yes I do agree its OTT and I do want to improve it.

I am creating a general settings panel and it has 4 or so tabs and each tab I have saved into a seperate database.

$socialInsert = new socialSettings;

           $socialInsert->socialName  = Request::input('name');
           $socialInsert->socialLink  = Request::input('value'); 
           $socialInsert->save();
29 Apr
3 years ago

jzmwebdevelopment left a reply on Using Isset Within Controller

@martinbean Thanks however that gives me No query results for model

jzmwebdevelopment started a new conversation Using Isset Within Controller

In my situation below whats the best way to check its isset?

This currently doesn't work as I am getting Undefined offset: 0

        $siteSocialTwitter       = socialSettings::where('socialName','=','twitter')->get();
        $siteTwitter             = isset($siteSocialTwitter[0]['socialLink']);

jzmwebdevelopment started a new conversation Why Am I Getting "items":protected]=> Array(0)

Why am I getting object(Illuminate\Database\Eloquent\Collection)#224 (1) { ["items":protected]=> array(0) { } } when I try to use the following to pull a result from the database.

Code:

        $siteSocialSettingsDB    = socialSettings::all();
        $siteSocialSettingsData  = $siteSocialSettingsDB; 

        $siteSocialFacebook      = $siteSocialSettingsDB->where('socialName','=','facebook');
25 Apr
3 years ago

jzmwebdevelopment left a reply on TokenMismatchException In VerifyCsrfToken.php

@mehany

My HTML is like this on each tab - do I only need the token on one?

input name="__RequestVerificationToken" type="hidden" value="{{ csrf_token() }}" />
    <div class="box-body">
      <div class="form-group">
        <label class="col-sm-2 control-label" for="siteName">Website Name</label>

        <div class="col-sm-3">
          <div class="input-group">
            <input class="form-control updateField" data-url="{{ route('generalDataSubmit', 1)}}" data-title="Website Name" name="siteName" placeholder="Email" type="input" value="{{ old('siteName', $siteSettingsData->siteName)}}"> <span class="input-group-btn"><button class="btn btn-default edit" type="button"><span class="glyphicon glyphicon glyphicon-pencil"></span></button></span>
          </div>
        </div>
      </div>

jzmwebdevelopment started a new conversation TokenMismatchException In VerifyCsrfToken.php

I am using x-editable as my "edit in place" however I am using bootstrap tabs on the same page and each tab has the same CSRF. Do they need to be different?

Blade:

  <input name="__RequestVerificationToken" type="hidden" value="{{ csrf_token() }}" />

JS:

$.fn.editable.defaults.params = function (params) {
    params._token = $("#_token").data("token");
    return params;
20 Apr
3 years ago

jzmwebdevelopment started a new conversation X-Editable And Passing Data

I am trying to get the data passed into my controller via X-Editable but I am getting myself confused in a couple of places/Laravel systems. I have created the var inputID = $('.updateField').data('id'); in my jQuery because my thinking was if I have multi fields on one page using the same class that there is no way to tell what is which and I wanted to use the "id" in the where statement in the controller. Is this the correct way to do this? and how would I configure this in jQuery for X-Editable so that it can be passed into PHP?

My HTML before the ".edit" button is clicked is this:

        <div class="col-sm-3">
          <div class="input-group">
            <input class="form-control updateField" data-id="siteName" data-title="Website Name" name="siteName" placeholder="Website Name" type="input" value="{{ old('siteName', $siteSettingsData->siteName)}}"> <span class="input-group-btn"><button class="btn btn-default edit" type="button"><span class="glyphicon glyphicon glyphicon-pencil"></span></button></span>
          </div>
        </div>

##The jQuery is:

/* X-Editable */

$(function(){

  
$.fn.editable.defaults.mode = 'inline';

$.fn.editable.defaults.params = function (params) {
    params._token = $("#_token").data("token");
    return params;
};
  
  var inputName = $('.updateField').data('title');
  var inputID   = $('.updateField').data('id');

  console.log(inputName);

$('.updateField').editable({
    type: 'text',
    url: 'admin/general/settings/gSubmit',    
    pk: 1,    
    placement: 'top',
    title: 'Enter public name',
    toggle:'manual',
    send:'always',
    ajaxOptions:{
      dataType: 'json'
    }    
});

$('.edit').click(function(e){    
       e.stopPropagation();
       $('.updateField').editable('toggle');
       $('.edit').hide();
});
    $(document).on('click', '.editable-cancel, .editable-submit', function(){
        $('.edit').show();
    })        
//ajax emulation. Type "err" to see error message
$.mockjax({
    url: '/post',
    responseTime: 100,
    response: function(settings) {
        if(settings.data.value == 'err') {
           this.status = 500;  
           this.responseText = 'Validation error!'; 
        } else {
           this.responseText = '';  
        }
    }
}); 
   
});
18 Apr
3 years ago

jzmwebdevelopment started a new conversation Using Node_modules

I have installed jquery-mockjack via NPM but how do I make it so that I can access it via public/admin/plugins/jquery-mockjack?

My current gulp is:

var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var livereload = require('gulp-livereload');

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 */


/*
 |--------------------------------------------------------------------------
 | Elixir JS Asset Management
 |--------------------------------------------------------------------------
 |
 */



jsSrc = 'public/admin/js/*.js';//Your js source directory
jsDest = 'public/admin/js/';//Your js destination directory

// Make Minify JS

gulp.task('scripts', function(){
    return gulp.src(jsSrc)
           .pipe(concat('app.js'))
           .pipe(gulp.dest(jsDest))
           .pipe(rename('app.min.js'))
           .pipe(uglify())
           .pipe(gulp.dest(jsDest))
           .pipe(livereload());

});

 // Stalk file for changes
 
 gulp.task('watch', function(){
    livereload.listen();
    gulp.watch(jsSrc);
 });

// Run run as quick as you can Minify

 gulp.task('minJS', ['scripts', 'watch']);

jzmwebdevelopment started a new conversation Task 'default' Is Not In Your Gulpfile

I have tried the NPM install and removed the node_modules folder however I am still getting the error when I run gulp etc

Have I missed something out of my file?

var gulp   = require('gulp');
var elixir = require('laravel-elixir');
var uglify = require('gulp-uglify');


/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 */


/*
 |--------------------------------------------------------------------------
 | Elixir JS Asset Management
 |--------------------------------------------------------------------------
 |
 */

 elixir.extend('uglify', function(){

    gulp.task('uglify', function(){

        gulp.src('public/admin/js/*.js')
            .pipe(uglify())
            .pipe(ext('-min.js'))
            .pipe(gulp.dest('public/admin/js'));
    });
        return this.queueTask('uglify');
 });
17 Apr
3 years ago

jzmwebdevelopment started a new conversation Bootstrap Editable - Dynamic Usage

I have a form that will have many fields and I am wanting to know if and how my idea will work.

I am using the following - http://learninglaravel.net/in-place-editing-with-x-editable-laravel/link .

My jQuery is as follows and is there a way with this that I could set the title to be that of the field that has just had the focus lost?:

    $(function(){
      $.fn.editable.defaults.mode = 'inline';
      $('.updateField').editable({
        validate: function(value)
        {
          if($.trim(value) == '')
            return 'Sorry you have not entered anything.';
        },
        type:text,
        url:       '{{URL::to("/")}}/admin/general/settings/gSubmit',
        title:     'Edit Website Name',
        placement: 'top',
        send:      'always',
        ajaxOptions:{
          dataType: 'json'
        }
    
      })
    
    });

In my controller I had an idea that because in my html I have my name value the same as my DB I could then create a variable to be my $data->$namevar to run through the update/save function but I am just unsure of the correctness of this and if the correct way is for me to write lines and lines of code.

My Controller is currently the same as given in the guide above while I think out my idea:

Guide Controller:

    public function postEditMarks() {
        //get student id whose marks are to be updated
        $studentId = Input::get('pk');
        //get the new marks
        $newMarks = Input::get('value');
        //get the Student Data Row to be updated with new marks
        $studentData = Student::whereId($studentId)->first();
        $studentData->marks = $newMarks;
        if($studentData->save()) 
            return Response::json(array('status'=>1));
        else 
            return Response::json(array('status'=>0));
    }

jzmwebdevelopment started a new conversation @yeild Usage

In a template I am using I have come across @yield('main-content')

Can I use this to include a file or how does it work?

jzmwebdevelopment started a new conversation Authentacation

I am currently using the below functions to handle the login of my code and I have a couple of questions:

  1. Is there anyway that I could improve it so that it checks that the logging user is 100% admin?

  2. How could I implement the remember me function?

##Code

     public function postLogin(Request $request)
    {   
       $credentials = $this->getLoginCredentials($request);

       if(Auth::attempt($credentials))
       {

        //Lets Log the login

        Auth::user()->last_login = Carbon::now();
        Auth::user()->save();

        return redirect()->intended('admin/dashboard');
       }
       return redirect()->back();

    }


  protected function getLoginCredentials(Request $request)
  {
    $validator = $this->loginValidation($request);

    if($validator->passes())
    {
    return[
    'email'    => $request->input('email'),
    'password' => $request->input('password'),
    'type'     => 1  
    ];

    }else{
        return redirect()->back()->withErrors();
    }
  }  

   protected function loginValidation($request)
    {

        $rules = array(
          'email'      => 'required|email',
          'password'   => 'required',
    );
        return Validator::make( $request->all() , $rules);
    }

jzmwebdevelopment started a new conversation Return View

In my folder structure I have views/admin/auth/someMoreFiles or templates.

How can I access them via return view('admin.login'); I can seem to get into the "admin" folder but not the rest

04 Apr
3 years ago

jzmwebdevelopment left a reply on Create/Edit Form

@jlrdw very hence why I am so confused

jzmwebdevelopment left a reply on Create/Edit Form

@frezno My issue is that I still don't understand why I need to have 2x different routes and methods for something that could be done within one page. There must be away to check if the column in the database has a value. If yes use this statement else use that

jzmwebdevelopment left a reply on Create/Edit Form

@zachleigh Is there away I could do this with out adjusting the url? I still cannot believe I have to have a /create /edit route and urls for three items - if I have to do the above means ill have to load a <a href="route" just for editing three items

jzmwebdevelopment left a reply on Create/Edit Form

Thanks again @zachleigh I noticed you said method - why would I change this is there something Laravel that I have to do?

03 Apr
3 years ago

jzmwebdevelopment left a reply on Create/Edit Form

Thanks @frezno still seems a bit over the top for what I want to do at this stage. @zachleigh do you have any ideas?

My Thinking currently was that I could check to see if a value exists already in the db for one of my columns and then use that to change the return statement from ::create to ::save. Should I implement another hidden field into the view with the id?

jzmwebdevelopment left a reply on Create/Edit Form

@jlrdw Yes but you don't see Wordpress's settings have an add/edit do you?

jzmwebdevelopment left a reply on Create/Edit Form

@frezo ├žorrect but how would I do the code update?

02 Apr
3 years ago

jzmwebdevelopment started a new conversation Create/Edit Form

How can I make it so that I can edit/create data via the same form?

Functions

    public function generalSettings()
    {
        $siteSettingsDB    = generalSettings::get();
        $siteSettingsData  = $siteSettingsDB[0];
        $pageName          = 'General Settings';
        $siteName          = $siteSettingsData->siteName;
        $pageTitle         = $pageName . ' | ' . $siteName;


        return view('admin.generalSettings', compact('pageTitle','siteSettingsData') );

    }


    public function generalSettingsGeneralSubmit(Request $request)
    {
        $this->validate($request, [
            'siteName'      => 'required|max:150',
            'siteEmail'     => 'email|unique:site_settings',
            'siteCopyright' => 'max:50',
        ]);

   
         $dbInsert = array(
            'siteName'      => $request->input('siteName'),
            'siteEmail'     => $request->input('siteEmail'),
            'siteCopyright' => $request->input('siteCopyright'),
            );

        return generalSettings::create($dbInsert);
    }

View

  <!-- BEGIN FORM-->
                                                <form action="settings/gSubmit" method="post" class="form-horizontal">
                                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                                    <div class="form-body">
                                                          <div class="form-group">
                                                            <label class="col-md-3 control-label">Website Name</label>
                                                            <div class="col-md-4">
                                                                    <input type="input" class="form-control input-circle-right" name="siteName" value="{{ old('siteName', $siteSettingsData->siteName)}}" placeholder="Website Name"> 
                                                                    @if ($errors->has('siteName'))
                                                                    <span class="help-block">{{ $errors->first('siteName') }}</span>
                                                                    @else 
                                                                    <span class="help-block">The name of this application</span>
                                                                    @endif
                                                                    </div>
                                                            </div>
                                                        <div class="form-group">
                                                            <label class="col-md-3 control-label">Email Address</label>
                                                            <div class="col-md-4">
                                                                    <input type="email" class="form-control input-circle-right" name="siteEmail" value="{{ old('siteEmail', $siteSettingsData->siteEmail )}}" placeholder="Email Address"> 
                                                                    @if ($errors->has('siteEmail'))
                                                                    <span class="help-block">{{ $errors->first('siteEmail') }}</span>
                                                                    @else 
                                                                    <span class="help-block">An e-mail address for all default notifications</span>
                                                                    @endif
                                                                    </div>
                                                            </div>
                                                          <div class="form-group">
                                                            <label class="col-md-3 control-label">Website Copyright</label>
                                                            <div class="col-md-4">
                                                                    <input type="input" class="form-control input-circle-right" name="siteCopyright" value="{{ old('siteCopyright', $siteSettingsData->siteCopyright )}}" placeholder="Website Copyright"> 
                                                                    @if ($errors->has('siteCopyright'))
                                                                    <span class="help-block">{{ $errors->first('siteCopyright') }}</span>
                                                                    @else 
                                                                    <span class="help-block">Business or person that this application is copyrighted to</span>
                                                                    @endif
                                                                    </div>
                                                            </div>
                                                        </div>
                                                    <div class="form-actions">
                                                        <div class="row">
                                                            <div class="col-md-offset-3 col-md-9">
                                                                <button type="submit" class="btn btn-circle green">Submit</button>
                                                                <button type="button" class="btn btn-circle grey-salsa btn-outline">Cancel</button>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </form>
                                                <!-- END FORM-->

jzmwebdevelopment left a reply on Data Not Being Passed To View.

@zachleigh Thats what I did do - but I didnt have to do the @include ['pageTitle => $pagetitle]

jzmwebdevelopment left a reply on Data Not Being Passed To View.

@zachleigh I now get Undefined variable: data in the head when I use $data['thisThing'];

01 Apr
3 years ago

jzmwebdevelopment left a reply on Data Not Being Passed To View.

@zachleigh Because when using include I could not see how I could past the $data to it?

jzmwebdevelopment started a new conversation Data Not Being Passed To View.

Why is my $data not being passed through to my $header. I have seen 4.2 examples of how to do this and that used ->render() but what is the 5.2 way to do this?

Function:

    public function generalSettings()
    {
        $siteSettingsDB    = generalSettings::get();
        $siteSettingsData  = $siteSettingsDB[0];
        $data['header']    = view('admin/inc/head');
        $data['footer']    = view('admin/inc/internalFooter');
        $data['pageTitle'] = 'General Settings';
        $data['siteName']  = $siteSettingsData->siteName;


        return view('admin.generalSettings', $data);

    }

View:

    <head>
        <meta charset="utf-8" />
        <title>{!! $pageTitle  !!}</title>

jzmwebdevelopment started a new conversation Getting Data From DB

I can show my data object by using $siteSettingsDB = generalSettings::get();. However by reading the documentation I cannot work out what the next step is. I would ideally like to use $siteSettings->DBColumn;

jzmwebdevelopment left a reply on Base Table Or View Not Found

@zachleigh Yup its all good - Have started a new thread on something more awesome haha

jzmwebdevelopment started a new conversation Page Title Footer Copyright Etc

I have split my layouts up into Header, "content", Footer and the header and footer is included in each content load.

How could I send data through to the or any other aspect that I might need to?</p> </div> </div> </div> </div> <div class="tw-flex timeline-section"> <!-- The date for the Timeline group. --> <div class="timeline-date lg:tw-w-48"> <div class="tw-text-center tw-inline-block"> <div class="tw-bg-white tw-border tw-border-solid tw-border-grey-light tw-rounded-full tw-inline-block tw-font-bold tw-uppercase tw-text-xs lg:tw-text-sm tw-py-2 tw-px-2 tw-text-grey-dark tw-mb-2"> <span class="lg:tw-border-r lg:tw-border-solid lg:tw-border-grey-light tw-w-8 tw-px-3"> 31 </span> <span class="tw-w-8 tw-px-3"> Mar </span> </div> <div class="tw-text-grey tw-uppercase tw-font-bold tw-text-2xs lg:tw-text-xs">3 years ago</div> </div> </div> <!-- The list of events for that date. --> <div class="timeline-contents tw-flex-1 tw-py-0 tw-pl-8 lg:tw-w-4/5"> <!-- type, description, link, date --> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> started a new conversation <a href="https://laracasts.com/discuss/channels/laravel/including-model" v-pre> Including Model </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p>I have a model called generalSettings.php and I am trying to access it via my function by doing the below and I am getting an error - Do I have to include it?</p> <h2>Error Line:</h2> <pre><code>return generalSettings::create($dbInsert); </code></pre> <h2>Error Message</h2> <pre><code> Class 'App\Http\Controllers\Admin\generalSettings' not found </code></pre> </div> </div> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> left a reply on <a href="https://laracasts.com/discuss/channels/laravel/base-table-or-view-not-found-2?page=2#reply-151926" v-pre> Base Table Or View Not Found </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p><a href="/@zachleigh">@zachleigh</a> Sorry went for a sleep and woke up and read your comment and clicked:</p> <pre><code> 'siteEmail' => 'email|unique:settings', </code></pre> <p>Should of been</p> <pre><code> 'siteEmail' => 'email|unique:site_settings', </code></pre> </div> </div> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> left a reply on <a href="https://laracasts.com/discuss/channels/laravel/base-table-or-view-not-found-2?page=2#reply-151904" v-pre> Base Table Or View Not Found </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p><a href="/@zachleigh">@zachleigh</a></p> <h2>Query Exception</h2> <pre><code>in Connection.php line 669 at Connection->runQueryCallback('select count(*) as aggregate from `settings` where `siteEmail` = ?', array('myEmail'), object(Closure)) in Connection.php line 629 at Connection->run('select count(*) as aggregate from `settings` where `siteEmail` = ?', array('myEmail'), object(Closure)) in Connection.php line 342 at Connection->select('select count(*) as aggregate from `settings` where `siteEmail` = ?', array('myEmail'), true) in Builder.php line 1461 at Builder->runSelect() in Builder.php line 1447 at Builder->get(array('*')) in Builder.php line 1808 at Builder->aggregate('count', array('*')) in Builder.php line 1728 at Builder->count() in DatabasePresenceVerifier.php line 58 at DatabasePresenceVerifier->getCount('settings', 'siteEmail', 'myEmail', null, null, array()) in Validator.php line 1223 at Validator->validateUnique('siteEmail', 'myEmail', array('settings'), object(Validator)) in Validator.php line 416 at Validator->validate('siteEmail', 'unique:settings') in Validator.php line 356 at Validator->passes() in Validator.php line 381 at Validator->fails() in ValidatesRequests.php line 53 at Controller->validate(object(Request), array('siteName' => 'required|max:150', 'siteEmail' => 'email|unique:settings', 'siteCopyright' => 'max:50')) in AdminController.php line 49 at AdminController->generalSettingsGeneralSubmit(object(Request)) at call_user_func_array(array(object(AdminController), 'generalSettingsGeneralSubmit'), array(object(Request))) in Controller.php line 80 at Controller->callAction('generalSettingsGeneralSubmit', array(object(Request))) in ControllerDispatcher.php line 146 at ControllerDispatcher->call(object(AdminController), object(Route), 'generalSettingsGeneralSubmit') in ControllerDispatcher.php line 94 at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103 at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96 at ControllerDispatcher->callWithinStack(object(AdminController), object(Route), object(Request), 'generalSettingsGeneralSubmit') in ControllerDispatcher.php line 54 at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\Admin\AdminController', 'generalSettingsGeneralSubmit') in Route.php line 174 at Route->runController(object(Request)) in Route.php line 140 at Route->run(object(Request)) in Router.php line 724 at Router->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AdminAuthController.php line 29 at AdminAuthController->handle(object(Request), object(Closure)) at call_user_func_array(array(object(AdminAuthController), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64 at VerifyCsrfToken->handle(object(Request), object(Closure)) at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49 at ShareErrorsFromSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 62 at StartSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59 at EncryptCookies->handle(object(Request), object(Closure)) at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103 at Pipeline->then(object(Closure)) in Router.php line 726 at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699 at Router->dispatchToRoute(object(Request)) in Router.php line 675 at Router->dispatch(object(Request)) in Kernel.php line 246 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103 at Pipeline->then(object(Closure)) in Kernel.php line 132 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99 at Kernel->handle(object(Request)) in index.php line 54 </code></pre> <h2>PDOException</h2> <pre><code>in Connection.php line 333 at PDO->prepare('select count(*) as aggregate from `settings` where `siteEmail` = ?') in Connection.php line 333 at Connection->Illuminate\Database\{closure}(object(MySqlConnection), 'select count(*) as aggregate from `settings` where `siteEmail` = ?', array('myEmail')) in Connection.php line 662 at Connection->runQueryCallback('select count(*) as aggregate from `settings` where `siteEmail` = ?', array('myEmail'), object(Closure)) in Connection.php line 629 at Connection->run('select count(*) as aggregate from `settings` where `siteEmail` = ?', array('myEmail'), object(Closure)) in Connection.php line 342 at Connection->select('select count(*) as aggregate from `settings` where `siteEmail` = ?', array('myEmail'), true) in Builder.php line 1461 at Builder->runSelect() in Builder.php line 1447 at Builder->get(array('*')) in Builder.php line 1808 at Builder->aggregate('count', array('*')) in Builder.php line 1728 at Builder->count() in DatabasePresenceVerifier.php line 58 at DatabasePresenceVerifier->getCount('settings', 'siteEmail', 'myEmail', null, null, array()) in Validator.php line 1223 at Validator->validateUnique('siteEmail', 'myEmail', array('settings'), object(Validator)) in Validator.php line 416 at Validator->validate('siteEmail', 'unique:settings') in Validator.php line 356 at Validator->passes() in Validator.php line 381 at Validator->fails() in ValidatesRequests.php line 53 at Controller->validate(object(Request), array('siteName' => 'required|max:150', 'siteEmail' => 'email|unique:settings', 'siteCopyright' => 'max:50')) in AdminController.php line 49 at AdminController->generalSettingsGeneralSubmit(object(Request)) at call_user_func_array(array(object(AdminController), 'generalSettingsGeneralSubmit'), array(object(Request))) in Controller.php line 80 at Controller->callAction('generalSettingsGeneralSubmit', array(object(Request))) in ControllerDispatcher.php line 146 at ControllerDispatcher->call(object(AdminController), object(Route), 'generalSettingsGeneralSubmit') in ControllerDispatcher.php line 94 at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103 at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96 at ControllerDispatcher->callWithinStack(object(AdminController), object(Route), object(Request), 'generalSettingsGeneralSubmit') in ControllerDispatcher.php line 54 at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\Admin\AdminController', 'generalSettingsGeneralSubmit') in Route.php line 174 at Route->runController(object(Request)) in Route.php line 140 at Route->run(object(Request)) in Router.php line 724 at Router->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AdminAuthController.php line 29 at AdminAuthController->handle(object(Request), object(Closure)) at call_user_func_array(array(object(AdminAuthController), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64 at VerifyCsrfToken->handle(object(Request), object(Closure)) at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49 at ShareErrorsFromSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 62 at StartSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59 at EncryptCookies->handle(object(Request), object(Closure)) at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103 at Pipeline->then(object(Closure)) in Router.php line 726 at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699 at Router->dispatchToRoute(object(Request)) in Router.php line 675 at Router->dispatch(object(Request)) in Kernel.php line 246 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103 at Pipeline->then(object(Closure)) in Kernel.php line 132 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99 at Kernel->handle(object(Request)) in index.php line 54 </code></pre> </div> </div> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> left a reply on <a href="https://laracasts.com/discuss/channels/laravel/base-table-or-view-not-found-2?page=1#reply-151902" v-pre> Base Table Or View Not Found </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p><a href="/@zachleigh">@zachleigh</a> Sorry I am confusing myself by 'tblname' I mean 'dbname'. no I have not done anything other then auth</p> </div> </div> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> left a reply on <a href="https://laracasts.com/discuss/channels/laravel/base-table-or-view-not-found-2?page=1#reply-151900" v-pre> Base Table Or View Not Found </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p><a href="/@zachleigh">@zachleigh</a> Can confirm its there: <a href="https://www.dropbox.com/s/t8ugvinmomnaf2a/Screenshot%202016-04-01%2013.17.14.png?dl=0" target="_blank">https://www.dropbox.com/s/t8ugvinmomnaf2a/Screenshot%202016-04-01%2013.17.14.png?dl=0</a></p> <p>The error is:</p> <pre><code>SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tblname.settings' doesn't exist (SQL: select count(*) as aggregate from `settings` where `siteEmail` = myemail<a href="/@ihug.co.nz">@ihug.co.nz</a>) </code></pre> </div> </div> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> left a reply on <a href="https://laracasts.com/discuss/channels/laravel/base-table-or-view-not-found-2?page=1#reply-151897" v-pre> Base Table Or View Not Found </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p><a href="/@zachleigh">@zachleigh</a> but if thats the case why would my auth etc work? and this wont? its strange</p> </div> </div> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> left a reply on <a href="https://laracasts.com/discuss/channels/laravel/base-table-or-view-not-found-2?page=1#reply-151894" v-pre> Base Table Or View Not Found </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p><a href="/@zachleigh">@zachleigh</a> DB_DATABASE=dbName and the dbName itself match :)</p> </div> </div> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> left a reply on <a href="https://laracasts.com/discuss/channels/laravel/base-table-or-view-not-found-2?page=1#reply-151892" v-pre> Base Table Or View Not Found </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p>Yes :) "Nothing to migrate" because its already in the db :)</p> </div> </div> <div class="timeline-contents-item tw-mb-9"> <p class="tw-bg-blue-lightest tw-text-grey-dark tw-font-bold tw-rounded-lg tw-py-2 tw-px-3 tw-mb-4 tw-tracking-normal"> <a href="https://laracasts.com/@jzmwebdevelopment"> jzmwebdevelopment </a> left a reply on <a href="https://laracasts.com/discuss/channels/laravel/base-table-or-view-not-found-2?page=1#reply-151889" v-pre> Base Table Or View Not Found </a> </p> <div class="content user-content tw-text-grey-darkest tw-pl-2" v-pre> <p><a href="/@zachleigh">@zachleigh</a></p> <p>I have the following and I am still getting the error - What am I missing?</p> <h2>Function:</h2> <pre><code> public function generalSettingsGeneralSubmit(Request $request) { $this->validate($request, [ 'siteName' => 'required|max:150', 'siteEmail' => 'email|unique:settings', 'siteCopyright' => 'max:50', ]); $dbInsert = array( 'siteName' => $request->input('siteName'), 'siteEmail' => $request->input('siteEmail'), 'siteCopyright' => $request->input('siteCopyright'), ); return generalSettings::create($dbInsert); //return view('admin.generalSettings'); } } </code></pre> <p>I have got my $fillable set in my controller is there anyway that I can do this on a per function basis?</p> <h2>Model:</h2> <pre><code><?php namespace App; use Illuminate\Database\Eloquent\Model; class generalSettings extends Model { protected $table = 'site_settings'; } </code></pre> </div> </div> </div> </div> </div> </div> </div> <div class="footer-wrap mobile:tw-text-lg"> <section class="footer-section top md:tw-pb-0 tw-pt-0"> <div class="container"> <div class="md:tw-w-1/2 tw-mx-auto tw-text-center"> <div> <h2 class="tw-text-white tw-text-3xl pr-1-tablet tw-mb-8 tw-tracking-tight"> Want us to email you occasionally with Laracasts news? </h2> </div> <div> <newsletter-form></newsletter-form> </div> </div> </div> </section> <section class="footer-section bottom mobile:tw-text-center tw-py-0"> <footer class="container"> <div class="md:tw-flex md:mb-3"> <div class="md:tw-w-2/5 md:tw-mr-auto"> <div class="tw-mb-3"> <svg class="tw-fill-current tw-text-white" width="232" height="44" viewBox="0 0 361 36" xmlns="http://www.w3.org/2000/svg"> <g fill="none" fill-rule="evenodd"> <path d="M0 4.83h6.986v24.521h15.137v5.699H0V4.83zm53.374 23.744H39.36l-2.674 6.476h-7.159L42.981 4.83h6.9L63.38 35.05h-7.33l-2.675-6.476zm-2.199-5.31l-4.787-11.57-4.787 11.57h9.574zM92.949 35.05l-5.822-8.418H80.7v8.418h-6.986V4.83h13.067c2.674 0 4.995.446 6.965 1.339 1.969.892 3.485 2.158 4.55 3.799 1.063 1.64 1.595 3.583 1.595 5.828s-.54 4.18-1.617 5.806c-1.078 1.626-2.61 2.871-4.593 3.734l6.77 9.714H92.95zm-.13-19.254c0-1.698-.546-3-1.638-3.907-1.093-.907-2.688-1.36-4.787-1.36H80.7v10.534h5.693c2.099 0 3.694-.461 4.787-1.382 1.092-.92 1.638-2.216 1.638-3.885zm39.661 12.778h-14.016l-2.673 6.476h-7.16l13.456-30.22h6.9l13.498 30.22h-7.331l-2.674-6.476zm-2.2-5.31l-4.786-11.57-4.787 11.57h9.574zm36.556 12.304c-3.076 0-5.858-.67-8.344-2.008-2.487-1.338-4.442-3.194-5.865-5.569-1.424-2.374-2.135-5.058-2.135-8.05 0-2.994.711-5.678 2.135-8.052 1.423-2.375 3.378-4.231 5.865-5.57 2.486-1.338 5.282-2.007 8.387-2.007 2.617 0 4.981.46 7.094 1.382 2.114.92 3.889 2.245 5.326 3.971l-4.485 4.145c-2.04-2.36-4.57-3.54-7.59-3.54-1.868 0-3.536.41-5.002 1.23a8.742 8.742 0 0 0-3.429 3.432c-.819 1.468-1.229 3.137-1.229 5.008 0 1.87.41 3.54 1.23 5.008a8.742 8.742 0 0 0 3.428 3.432c1.466.82 3.134 1.23 5.002 1.23 3.02 0 5.55-1.194 7.59-3.583l4.485 4.145c-1.437 1.755-3.22 3.093-5.347 4.014-2.128.921-4.5 1.382-7.116 1.382zm73.888 0c-2.387 0-4.694-.324-6.922-.971-2.228-.648-4.018-1.49-5.369-2.526l2.372-5.267c1.294.95 2.832 1.713 4.614 2.288 1.783.576 3.565.864 5.348.864 1.984 0 3.45-.295 4.399-.885.948-.59 1.423-1.375 1.423-2.353 0-.72-.28-1.317-.841-1.792-.56-.475-1.28-.856-2.156-1.144-.877-.288-2.063-.604-3.558-.95-2.3-.546-4.183-1.093-5.65-1.64a9.178 9.178 0 0 1-3.773-2.633c-1.05-1.21-1.574-2.82-1.574-4.836 0-1.755.474-3.345 1.423-4.77.949-1.425 2.38-2.554 4.29-3.389 1.913-.834 4.249-1.252 7.009-1.252 1.926 0 3.81.23 5.65.691 1.84.46 3.45 1.122 4.83 1.986l-2.157 5.31c-2.789-1.583-5.578-2.375-8.366-2.375-1.955 0-3.4.317-4.334.95-.935.633-1.402 1.468-1.402 2.504s.54 1.806 1.617 2.31c1.078.503 2.724 1 4.938 1.49 2.3.546 4.183 1.093 5.65 1.64a9.355 9.355 0 0 1 3.773 2.59c1.05 1.18 1.574 2.777 1.574 4.792a8.258 8.258 0 0 1-1.445 4.727c-.963 1.425-2.408 2.554-4.334 3.389-1.926.835-4.27 1.252-7.03 1.252zm30.604-25.04h-9.66V4.83h26.306v5.699h-9.66v24.52h-6.986V10.53zm37.289 25.04c-2.386 0-4.694-.324-6.922-.971-2.228-.648-4.017-1.49-5.369-2.526l2.372-5.267c1.294.95 2.832 1.713 4.615 2.288 1.782.576 3.564.864 5.347.864 1.984 0 3.45-.295 4.399-.885.949-.59 1.423-1.375 1.423-2.353 0-.72-.28-1.317-.841-1.792-.56-.475-1.28-.856-2.156-1.144-.877-.288-2.063-.604-3.558-.95-2.3-.546-4.183-1.093-5.65-1.64a9.178 9.178 0 0 1-3.773-2.633c-1.05-1.21-1.574-2.82-1.574-4.836 0-1.755.474-3.345 1.423-4.77.949-1.425 2.38-2.554 4.291-3.389 1.912-.834 4.248-1.252 7.008-1.252 1.926 0 3.81.23 5.65.691 1.84.46 3.45 1.122 4.83 1.986l-2.157 5.31c-2.789-1.583-5.577-2.375-8.366-2.375-1.955 0-3.4.317-4.334.95-.935.633-1.402 1.468-1.402 2.504s.54 1.806 1.617 2.31c1.078.503 2.724 1 4.938 1.49 2.3.546 4.183 1.093 5.65 1.64a9.355 9.355 0 0 1 3.773 2.59c1.05 1.18 1.574 2.777 1.574 4.792a8.258 8.258 0 0 1-1.445 4.727c-.963 1.425-2.407 2.554-4.334 3.389-1.926.835-4.27 1.252-7.03 1.252z" fill="#FFF" fill-rule="nonzero"/> <g fill="#FFF"> <path d="M192.912 8.921l4.923 4.924a2.597 2.597 0 0 1-3.673 3.673l-4.923-4.924a2.597 2.597 0 1 1 3.673-3.673zM203.437 19.447l10.547 10.547a2.597 2.597 0 0 1-3.673 3.673L199.764 23.12a2.597 2.597 0 1 1 3.673-3.673z"/> <path d="M190.416 8.255L218.753.893A2.672 2.672 0 0 1 222 2.767a2.592 2.592 0 0 1-1.846 3.199l-28.338 7.362a2.672 2.672 0 0 1-3.247-1.875 2.592 2.592 0 0 1 1.847-3.198z"/> <path d="M209.592 31.104l7.363-28.337A2.592 2.592 0 0 1 220.153.92a2.672 2.672 0 0 1 1.875 3.247l-7.362 28.337a2.592 2.592 0 0 1-3.199 1.847 2.672 2.672 0 0 1-1.875-3.247z"/> </g> <path d="M208.62 18.067l-10.236 10.235a2.643 2.643 0 1 1-3.738-3.738l10.236-10.235a2.643 2.643 0 0 1 3.738 3.738zM193.38 33.306l-1.54 1.54a2.643 2.643 0 1 1-3.738-3.738l1.54-1.54a2.643 2.643 0 0 1 3.738 3.738z" fill="#53B5FF"/> </g> </svg> </div> <p class="tw-mb-8 tw-text-white tw-leading-loose"> Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process. </p> <div class="tw-flex tw-w-42 md:tw-w-28 tw-justify-between tw-items-center mobile:tw-m-auto mobile:tw-mb-8"> <a href="https://www.youtube.com/laracastsofficial" target="_blank" rel="noreferrer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 19" class="tw-w-8 md:tw-w-6 tw-text-white hover:tw-text-black tw-transition-all"> <g class="tw-fill-current" fill-rule="nonzero"> <path d="M6.4 0H5.371l-.685 2.629L4 0H2.857c.229.686.457 1.257.686 1.943.343.914.571 1.714.571 2.171v2.743h1.029V4.114L6.4 0zm2.743 5.143V3.429c0-.572-.114-.915-.343-1.258-.229-.342-.571-.457-1.029-.457-.457 0-.8.229-1.028.572-.229.228-.343.571-.343 1.143v1.828c0 .572.114.914.343 1.143.228.343.571.457 1.028.457.458 0 .8-.228 1.029-.571.229-.115.343-.572.343-1.143zm-.914.228c0 .458-.115.686-.458.686-.342 0-.457-.228-.457-.686V3.2c0-.457.115-.686.457-.686.343 0 .458.229.458.686v2.171zm4.342 1.486V1.714h-.914V5.6c-.228.343-.343.457-.571.457a.246.246 0 0 1-.229-.228V1.714h-.914v4c0 .343 0 .572.114.8 0 .229.229.343.572.343.342 0 .685-.228 1.028-.571v.571h.914zM13.029 12c-.343 0-.458.229-.458.686v.457h.915v-.457c0-.457-.115-.686-.457-.686zM9.714 12c-.114 0-.343.114-.457.229v3.085c.114.115.343.229.457.229.229 0 .343-.229.343-.686v-2.171c0-.457-.114-.686-.343-.686z"/> <path d="M15.314 9.486C15.086 8.686 14.4 8 13.714 8 11.886 7.771 9.943 7.771 8 7.771c-1.943 0-3.771 0-5.714.229-.686 0-1.372.686-1.6 1.486-.229 1.143-.229 2.4-.229 3.543 0 1.142 0 2.4.229 3.542.228.8.8 1.372 1.6 1.486 1.943.229 3.771.229 5.714.229 1.943 0 3.771 0 5.714-.229.8-.114 1.486-.686 1.6-1.486.229-1.142.229-2.4.229-3.542 0-1.143 0-2.4-.229-3.543zM4.8 10.514H3.657v5.829H2.63v-5.829H1.6V9.486h3.2v1.028zm2.743 5.829h-.914v-.572c-.343.458-.686.572-1.029.572-.343 0-.457-.114-.571-.343 0-.114-.115-.343-.115-.8v-4h.915v4c0 .114.114.229.228.229.229 0 .343-.115.572-.458V11.2h.914v5.143zm3.428-1.6c0 .457 0 .8-.114 1.028-.114.343-.343.572-.686.572-.342 0-.685-.229-.914-.572v.458h-.914V9.486h.914v2.171c.343-.343.572-.571.914-.571.343 0 .572.228.686.571.114.229.114.572.114 1.029v2.057zm3.429-.8h-1.829v.914c0 .457.115.686.458.686.228 0 .342-.114.457-.343v-.571h.914V15.314c0 .229-.114.343-.229.572-.228.343-.571.571-1.142.571-.458 0-.8-.228-1.143-.571-.229-.229-.343-.686-.343-1.143v-1.714c0-.572.114-.915.228-1.143.229-.343.572-.572 1.143-.572.457 0 .8.229 1.029.572.228.228.228.685.228 1.143v.914h.229z"/> </g> </svg> </a> <a href="https://twitter.com/laracasts" target="_blank" rel="noreferrer"> <svg xmlns="http://www.w3.org/2000/svg" class="tw-w-8 md:tw-w-6 tw-text-white hover:tw-text-black tw-transition-all" viewBox="0 0 18 18"> <path class="tw-fill-current" fill-rule="nonzero" d="M9 0C4.037 0 0 4.037 0 9c0 4.962 4.037 9 9 9 4.962 0 9-4.038 9-9 0-4.963-4.037-9-9-9zm4.015 6.94c.004.09.006.18.006.27 0 2.737-2.083 5.892-5.894 5.892a5.86 5.86 0 0 1-3.175-.93 4.158 4.158 0 0 0 3.067-.858 2.074 2.074 0 0 1-1.936-1.439 2.088 2.088 0 0 0 .936-.034 2.072 2.072 0 0 1-1.662-2.032v-.026c.28.155.6.249.938.26a2.07 2.07 0 0 1-.64-2.766 5.882 5.882 0 0 0 4.269 2.165 2.071 2.071 0 0 1 3.53-1.89 4.135 4.135 0 0 0 1.316-.503 2.08 2.08 0 0 1-.912 1.146c.419-.05.82-.16 1.19-.326-.277.415-.628.78-1.033 1.071z"> </svg> </a> <a href="https://github.com/laracasts" target="_blank" rel="noreferrer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 29" class="tw-w-8 md:tw-w-6 tw-text-white hover:tw-text-black tw-transition-all"> <path class="tw-fill-current" fill-rule="nonzero" d="M27.959 7.434a14.866 14.866 0 0 0-5.453-5.414C20.21.69 17.703.025 14.984.025c-2.718 0-5.226.665-7.521 1.995A14.864 14.864 0 0 0 2.01 7.434C.67 9.714 0 12.202 0 14.901c0 3.242.953 6.156 2.858 8.746 1.906 2.589 4.367 4.38 7.385 5.375.351.064.611.019.78-.136a.755.755 0 0 0 .254-.58l-.01-1.047c-.007-.658-.01-1.233-.01-1.723l-.448.077a5.765 5.765 0 0 1-1.083.068 8.308 8.308 0 0 1-1.356-.136 3.04 3.04 0 0 1-1.308-.58c-.403-.304-.689-.701-.858-1.192l-.195-.445a4.834 4.834 0 0 0-.614-.988c-.28-.362-.563-.607-.85-.736l-.136-.097a1.428 1.428 0 0 1-.253-.233 1.062 1.062 0 0 1-.176-.271c-.039-.09-.007-.165.098-.223.104-.059.292-.087.566-.087l.39.058c.26.052.582.206.965.465.384.258.7.594.947 1.007.299.53.66.933 1.082 1.21.423.278.85.417 1.278.417.43 0 .8-.032 1.112-.097a3.9 3.9 0 0 0 .878-.29c.117-.866.436-1.53.956-1.996a13.447 13.447 0 0 1-2-.348 7.995 7.995 0 0 1-1.833-.756 5.244 5.244 0 0 1-1.571-1.298c-.416-.516-.758-1.195-1.024-2.034-.267-.84-.4-1.808-.4-2.905 0-1.563.514-2.893 1.541-3.99-.481-1.176-.436-2.493.137-3.952.377-.116.936-.03 1.678.261.741.291 1.284.54 1.629.746.345.207.621.381.83.523a13.948 13.948 0 0 1 3.745-.503c1.288 0 2.537.168 3.747.503l.741-.464c.507-.31 1.106-.595 1.795-.853.69-.258 1.216-.33 1.58-.213.586 1.46.638 2.777.156 3.951 1.028 1.098 1.542 2.428 1.542 3.99 0 1.099-.134 2.07-.4 2.916-.267.846-.611 1.524-1.034 2.034-.423.51-.95.94-1.58 1.288a8.01 8.01 0 0 1-1.834.756c-.592.155-1.259.271-2 .349.676.58 1.014 1.498 1.014 2.75v4.087c0 .232.081.426.244.58.163.155.42.2.77.136 3.019-.994 5.48-2.786 7.386-5.375 1.905-2.59 2.858-5.504 2.858-8.746 0-2.698-.671-5.187-2.01-7.466z"></path> </svg> </a> </div> </div> <div class="md:tw-w-1/6 mobile:tw-mb-6"> <h5 class="tw-text-white tw-font-bold md:tw-font-semibold tw-mb-2 md:tw-mb-6 tw-uppercase">Learn</h5> <ul class="tw-leading-loose"> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="/search?refinement=type&name=series">Browse</a></li> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="/index">Lesson Index</a></li> <li> <a href="/join" class="tw-text-transparent-50 hover:tw-text-white" @click.prevent="$modal.show('join-modal')">Sign Up</a> </li> <li> <a class="tw-text-transparent-50 hover:tw-text-white" href="/login" @click.prevent="dispatch('Login')"> Sign In </a> </li> </ul> </div> <div class="md:tw-w-1/6 mobile:tw-mb-6"> <h5 class="tw-text-white tw-font-bold md:tw-font-semibold tw-mb-2 md:tw-mb-6 tw-uppercase">Discuss</h5> <ul class="tw-leading-loose"> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="/discuss">Forum</a></li> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="/podcast">Podcast</a></li> <li><support-button></support-button></li> </ul> </div> <div class="md:tw-w-1/6 mobile:tw-mb-8"> <h5 class="tw-text-white tw-font-bold md:tw-font-semibold tw-mb-2 md:tw-mb-6 tw-uppercase">Extras</h5> <ul class="tw-leading-loose"> <li> <a class="tw-text-transparent-50 hover:tw-text-white" @click.prevent="$modal.show('testimonials-modal')">Testimonials</a> </li> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="/faq">FAQ</a></li> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="https://assets.laracasts.com">Assets</a></li> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="https://larajobs.com/?partner=36#" target="_blank" rel="noreferrer">Get a Job</a></li> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="/feed">RSS</a></li> </ul> <ul class="zeroed tw-leading-loose"> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="/privacy">Privacy</a></li> <li><a class="tw-text-transparent-50 hover:tw-text-white" href="/terms">Terms</a></li> </ul> </div> </div> <div class="tw-border-t tw-border-solid tw-border-transparent-10 tw-py-4 md:tw-mt-8 mobile:tw-text-lg"> <div class="tw-text-transparent-50 tw-text-base md:tw-text-xs tw-text-center"> <p class="tw-mb-5 md:tw-mb-2 tw-tracking-normal"> © Laracasts 2019. All rights reserved. <br class="md:tw-hidden" />Yes, all of them. That means you, Todd. </p> <p class="tw-tracking-normal"> <span class="mobile:tw-block">Designed with <img src="/images/icons/heart.svg" alt="heart" class="tw-px-1 tw-relative heart-pulse tw-inline" style="top: 2px"> by <a href="https://twitter.com/tudssss" class="tw-font-bold inherits-color link hover:tw-text-white">Tuds</a>.</span> <br class="md:tw-hidden">Proudly hosted with <a href="https://forge.laravel.com" class="tw-font-bold inherits-color link hover:tw-text-white">Laravel Forge</a> and <a href="https://www.digitalocean.com/?refcode=d2070a2d5f35" class="tw-font-bold link inherits-color link hover:tw-text-white">DigitalOcean</a>. </p> </div> </div> </footer> </section> </div> </div> <login-modal token="qRiCy7LwVuiQ0n1o4NQylukZYqmwhosnKb9QDfPu"></login-modal> <join></join> <testimonials-modal></testimonials-modal> <search-modal></search-modal> </div> <!-- close #root div --> <script src="https://cdn.jsdelivr.net/algoliasearch/3/algoliasearch.min.js"></script> <script src="https://cdn.jsdelivr.net/autocomplete.js/0/autocomplete.min.js"></script> <!-- Google Analytics --> <script> (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); ga('create','UA-44120322-1'); </script> <script> /*! modernizr 3.6.0 (Custom Build) | MIT * * https://modernizr.com/download/?-webp-setclasses !*/ !function(e,n,A){function o(e,n){return typeof e===n}function t(){var e,n,A,t,a,i,l;for(var f in r)if(r.hasOwnProperty(f)){if(e=[],n=r[f],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(A=0;A<n.options.aliases.length;A++)e.push(n.options.aliases[A].toLowerCase());for(t=o(n.fn,"function")?n.fn():n.fn,a=0;a<e.length;a++)i=e[a],l=i.split("."),1===l.length?Modernizr[l[0]]=t:(!Modernizr[l[0]]||Modernizr[l[0]]instanceof Boolean||(Modernizr[l[0]]=new Boolean(Modernizr[l[0]])),Modernizr[l[0]][l[1]]=t),s.push((t?"":"no-")+l.join("-"))}}function a(e){var n=u.className,A=Modernizr._config.classPrefix||"";if(c&&(n=n.baseVal),Modernizr._config.enableJSClass){var o=new RegExp("(^|\\s)"+A+"no-js(\\s|$)");n=n.replace(o,"$1"+A+"js$2")}Modernizr._config.enableClasses&&(n+=" "+A+e.join(" "+A),c?u.className.baseVal=n:u.className=n)}function i(e,n){if("object"==typeof e)for(var A in e)f(e,A)&&i(A,e[A]);else{e=e.toLowerCase();var o=e.split("."),t=Modernizr[o[0]];if(2==o.length&&(t=t[o[1]]),"undefined"!=typeof t)return Modernizr;n="function"==typeof n?n():n,1==o.length?Modernizr[o[0]]=n:(!Modernizr[o[0]]||Modernizr[o[0]]instanceof Boolean||(Modernizr[o[0]]=new Boolean(Modernizr[o[0]])),Modernizr[o[0]][o[1]]=n),a([(n&&0!=n?"":"no-")+o.join("-")]),Modernizr._trigger(e,n)}return Modernizr}var s=[],r=[],l={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var A=this;setTimeout(function(){n(A[e])},0)},addTest:function(e,n,A){r.push({name:e,fn:n,options:A})},addAsyncTest:function(e){r.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=l,Modernizr=new Modernizr;var f,u=n.documentElement,c="svg"===u.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;f=o(e,"undefined")||o(e.call,"undefined")?function(e,n){return n in e&&o(e.constructor.prototype[n],"undefined")}:function(n,A){return e.call(n,A)}}(),l._l={},l.on=function(e,n){this._l[e]||(this._l[e]=[]),this._l[e].push(n),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},l._trigger=function(e,n){if(this._l[e]){var A=this._l[e];setTimeout(function(){var e,o;for(e=0;e<A.length;e++)(o=A[e])(n)},0),delete this._l[e]}},Modernizr._q.push(function(){l.addTest=i}),Modernizr.addAsyncTest(function(){function e(e,n,A){function o(n){var o=n&&"load"===n.type?1==t.width:!1,a="webp"===e;i(e,a&&o?new Boolean(o):o),A&&A(n)}var t=new Image;t.onerror=o,t.onload=o,t.src=n}var n=[{uri:"data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=",name:"webp"},{uri:"data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==",name:"webp.alpha"},{uri:"data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",name:"webp.animation"},{uri:"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",name:"webp.lossless"}],A=n.shift();e(A.name,A.uri,function(A){if(A&&"load"===A.type)for(var o=0;o<n.length;o++)e(n[o].name,n[o].uri)})}),t(),a(s),delete l.addTest,delete l.addAsyncTest;for(var p=0;p<Modernizr._q.length;p++)Modernizr._q[p]();e.Modernizr=Modernizr}(window,document); </script> <script src="/js/manifest.js?id=393"></script> <script src="/js/vendor.js?id=393"></script> <script src="/js/app.js?v=395"></script> <script> ga('send', 'pageview'); </script> <script> </script> <script src="/highlight/highlight.pack.js"></script> <script> hljs.initHighlightingOnLoad(); </script> </body> </html> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>