samsoft

samsoft

Member Since 4 Years Ago

Experience Points 15,490
Experience
Level
Lessons Completed 139
Lessons
Completed
Best Reply Awards 1
Best Answer
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.

12 Feb
2 years ago

samsoft left a reply on I Need Help With Laravel 5.2 Multi Auth

Thanks @martinbean i understand your point.. but the application required three (3) operators with different interface and activities, i want each operator to be authenticate differently.

samsoft started a new conversation I Need Help With Laravel 5.2 Multi Auth

Need help, i've been battling with laravel 5.2 multi auth for couple of days now, please help me... i've the following model to be authenticated

  • User
  • Engineer
  • Admin
11 Feb
2 years ago

samsoft started a new conversation Mass Insertion On Two Model

Hello friends, Please how can do a mass insertion for two models with relationship of One-to-many? for example, i've users table and report table, user can upload more one report. is it possible to do this

example ==> $this->user()->report($input) 

Please how?

10 Feb
2 years ago

samsoft left a reply on Laravel 5.2 Multi Auth

I've been battling with 5.2 multiple Authentication for couple of days now, anyone to explain how this can be implemented? Thanks

09 Feb
2 years ago

samsoft left a reply on Scary Laravel Update

Thanks @lostdreamer_nl, i've read all article on Laravel 5.2 but question is, how do i implement multiple authentication.?

08 Feb
2 years ago

samsoft left a reply on Scary Laravel Update

@lostdreamer_nl appreciate, looking at the documentation now but can't find anything regarding that. please can you take a moment to explain in details everything in config/auth.php file.

return [

    /*
    |--------------------------------------------------------------------------
    | Authentication Defaults
    |--------------------------------------------------------------------------
    |
    | This option controls the default authentication "guard" and password
    | reset options for your application. You may change these defaults
    | as required, but they're a perfect start for most applications.
    |
    */

    'defaults' => [
        'guard' => 'web',
        'passwords' => 'users',
    ],

    /*
    |--------------------------------------------------------------------------
    | Authentication Guards
    |--------------------------------------------------------------------------
    |
    | Next, you may define every authentication guard for your application.
    | Of course, a great default configuration has been defined for you
    | here which uses session storage and the Eloquent user provider.
    |
    | All authentication drivers have a user provider. This defines how the
    | users are actually retrieved out of your database or other storage
    | mechanisms used by this application to persist your user's data.
    |
    | Supported: "session", "token"
    |
    */

    'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],

        'api' => [
            'driver' => 'token',
            'provider' => 'users',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | User Providers
    |--------------------------------------------------------------------------
    |
    | All authentication drivers have a user provider. This defines how the
    | users are actually retrieved out of your database or other storage
    | mechanisms used by this application to persist your user's data.
    |
    | If you have multiple user tables or models you may configure multiple
    | sources which represent each model / table. These sources may then
    | be assigned to any extra authentication guards you have defined.
    |
    | Supported: "database", "eloquent"
    |
    */

    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\User::class,
        ],

        // 'users' => [
        //     'driver' => 'database',
        //     'table' => 'users',
        // ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Resetting Passwords
    |--------------------------------------------------------------------------
    |
    | Here you may set the options for resetting passwords including the view
    | that is your password reset e-mail. You may also set the name of the
    | table that maintains all of the reset tokens for your application.
    |
    | You may specify multiple password reset configurations if you have more
    | than one user table or model in the application and you want to have
    | separate password reset settings based on the specific user types.
    |
    | The expire time is the number of minutes that the reset token should be
    | considered valid. This security feature keeps tokens short-lived so
    | they have less time to be guessed. You may change this as needed.
    |
    */

    'passwords' => [
        'users' => [
            'provider' => 'users',
            'email' => 'auth.emails.password',
            'table' => 'password_resets',
            'expire' => 60,
        ],
    ],

];

samsoft started a new conversation Scary Laravel Update

Just pull a new Laravel through composer, checked the config/auth.php file, it really scare me. can someone please explain to me he new update, is it that Laravel has enable multiple authentication? i was planing to implement the library below

https://github.com/Sarav-S/Laravel-Multiauth

Appreciate

16 Oct
3 years ago

samsoft left a reply on How To Hide .env File

I just check locally... i can't access .env file. but i can access it online when i navigate to domain.com/laravel/.env laravel is a folder where i store the laveral file excluding the public files. I'm using share hosting, all my domain file was deleted 24hours ago, call Godaddy, they ask me to pay $150 for recover my file... please i need to secure my .env file. Thanks

samsoft left a reply on How To Hide .env File

I'm using Laravel 5, change the APP_ENV=Production but can still access it when i go to domain/com/laravel/.env

samsoft started a new conversation How To Hide .env File

Please how can i secure my .env file from been access from the broswer. my .env file display on the broswer if type domain.com/laravel/.env

I'm using godaddy share hosting.

Please help

13 Oct
3 years ago

samsoft left a reply on Barcode With Laravel 5.1

"dinesh/barcode" is not available, any alternative

20 Sep
3 years ago

samsoft left a reply on How To Get Storage Directory

I've tried it, i need to get the path... example www.mysite.com/storage/app/myfile.pdf please how can i achieve that with my file stored in storage/app folder?

samsoft started a new conversation How To Get Storage Directory

Hello guyz, please i've a file in storage/app/my_file.pdf directory need to be consume by android application, please how can i get OR declare the directory to where the file is stored. Thanks

07 Sep
3 years ago

samsoft left a reply on Many To Many Problem, Please Help!

Yeah @pmall, Student::find($std_id) don't match any student but i've finally resolve it using your suggestion above. I really appreciate your help... below is the code

Student::find($std_id)->course()->sync([$course_id], false);

samsoft left a reply on Many To Many Problem, Please Help!

thanks @pmall, i've try it but display error below

FatalErrorException in ApiController.php line 294:
Call to a member function course() on a non-object

I replace the "find" with "whereId" then it split this error

BadMethodCallException in Builder.php line 2024:
Call to undefined method Illuminate\Database\Query\Builder::course()

here is my Student and Course class

class Student extends Model
{
  public $table = 'students';

    public function course(){
        return $this->belongsToMany(\App\Courses::class, 'course_student', 'students_id', 'course_id');
    }

}

class Courses extends Model
{
    use RecordActivity;
    public $table = 'course';
    public function student(){
        return $this->belongsToMany(\App\Student::class, 'course_student', 'course_id', 'students_id');
    }
}

course_student table is 
id
course_id
students_id

Please what's missing?

samsoft started a new conversation Many To Many Problem, Please Help!

I've table course, student and course_student as the pivot table, whenever i perform below query, i don't want a student to add course_id 2 (two) times to the table, Please how can i achieve this?

return Student::find($std_id)->course()->attach($course_id);
11 Aug
3 years ago

samsoft left a reply on Best And Secure Api Authentication

@neomerx appreciate.... keep them coming!

07 Aug
3 years ago

samsoft started a new conversation Best And Secure Api Authentication

I'm developing sms gateway library, any secure and best Api authentication for this development

samsoft left a reply on MorphTo Relationship Issue

Thanks @pmall corrected!

samsoft left a reply on MorphTo Relationship Issue

Thanks Guyz... i've solve, is just a typo error!

samsoft started a new conversation MorphTo Relationship Issue

Guyz, i need some help... i'm happy problem with MorphTo relationship, Below is my activitives class

class Activities extends Model
{

    public $table = 'activities';

    public $fillable = [
        'subject_id',
        'subject_name',
        'name',
        'user_id'
    ];

    //lecturer activities
    public function subject()
    {
        return $this->morphTo();
    }
}

I've lecturer Model

class Lecturer extends Model
{
    public $table = 'lecturer';

    public $fillable = [
        'email',
        'password',
        'username',
        'remember_token',
    'uuid',
    'first_name'
    'last_name',
    'title',
    'bio',
    'phone',
    ];

    public function activity()
    {
        return $this->hasMany(\Samsoft\Utility\Utility\Activities::class, 'user_id');
    }
}

When i dump it... it will return the activity but under the relationship where i have the subject, it return null

dd($lecturer->activity()->with('subject')->get()); it return "subject" => null

Help !!!

05 Aug
3 years ago

samsoft left a reply on PHP To JavaScript Not Working In 5.1

@milon @pmall @todayis3 it finally work... i make a silly mistake in the java script settings, instead of dot(.), i applied slash(/).

samsoft left a reply on PHP To JavaScript Not Working In 5.1

Thanks @bobbybouwmann for your time, i'm using laravel 5.1 and i've follow the installation instruction on depicted here https://github.com/laracasts/PHP-Vars-To-Js-Transformer so when i call the method below... it return undefined on console.log(user)

 \JavaScript::put([
            'foo' => 'bar',
            'user' => User::find(1),
            'age' => 29
        ]);

i publish the default configuration but i didn't change anything in the configuration file. Please i'm missing anything here... once again, i called the javascript within controller method.

04 Aug
3 years ago

samsoft started a new conversation Display Doc & PDF On Web Broswer

I know this is not part of laravel but i'll like to know how i can display/embeded PDF, DOC within the browser? like how Amazon display file on html.

samsoft started a new conversation PHP To JavaScript Not Working In 5.1

i've been trying to use laravel utilities libraries but not working? Any help?

        \JavaScript::put([
            'foo' => 'bar',
            'user' => User::find(1),
            'age' => 29
        ]);

samsoft left a reply on Vuejs And Summernote

Thanks @bimalshah72, it works... Thanks

samsoft left a reply on Vuejs And Summernote

Thanks @bimalshah72 , appreciate.... it work perfectly but i'm unable to get the text from note using console.log(this.note)

    ready: function(){

        var config = {};
            config.minHeight = null;
            config.height = 350;
            config.focus = true;

            config.toolbar =  [

                ['style', ['bold', 'italic', 'underline', 'clear']],
                ['font', ['strikethrough', 'superscript', 'subscript']],
                ['fontsize', ['fontsize']],
                ['color', ['color']],
                ['para', ['ul', 'ol', 'paragraph']],
                ['height', ['height']],

            ]; // watever toolbar you need..

            config.onBlur = function(e) {
                $(this).note = $('#summernote').code(); // take here element code and assign
            };

            $('#summernote').summernote(config);
    },


    methods:{

        addMaterials : function(e){
            console.log(this.note);
}

samsoft started a new conversation Vuejs And Summernote

I'm currently working with Summernote, is there anyway i can get summernote data within Vuejs? I'll appreciate your help. Thanks

samsoft started a new conversation $check And Validate Uploaded File Using Vuejs

please, how can i $check and Validate uploaded File using Vuejs

01 Aug
3 years ago

samsoft left a reply on Vuejs Need Help

Thanks @bestmomo , it work perfectly...

31 Jul
3 years ago

samsoft left a reply on 422 (Unprocessable Entity) Help

Thanks.. i've resolve it!

samsoft started a new conversation 422 (Unprocessable Entity) Help

I've been trying to submit data through vuejs resources library but this error keep pop up 422 (Unprocessable Entity), please kindy help

            this.$http.post('/api/v1/createCourse', {course: this.newCourse}, function (data, status, request) {
                // handle success
                console.log(data);
            }).error(function (data, status, request) {
                // handle error
                console.log(data);
            })

samsoft left a reply on Vuejs Need Help

Thanks @bestmomo @martink8 here is my code

                            <div class="col-md-4">
                                <label for="session">Session</label>
                                <select v-model="newCourse.session" name="session" class="form-control" name="session">
                                    @foreach($repo->versitySession() as $index => $session)
                                        <option value="{{ $session->id }}">{{ $session->session }}</option>
                                    @endforeach
                                </select>
                            </div>

the empty space will only show when i applied v-model="newCourse.session"

30 Jul
3 years ago

samsoft started a new conversation Vuejs Select Dropdown

Currently using vuejs on my project, everything work well but what i discovered was that the select dropdown show space as first in the list, need to click to see the lists? please what can i do in this situation as user need to see the first lists in the select dropdown. Thanks

samsoft left a reply on How To Use Vuejs With Select Tags ?

Currently using vuejs on my project, everything work well but what i discovered was that the select dropdown show space at the top, need to click to see the list? please what can i do in this situation as user need to see the first lists in the select dropdown. Thanks

samsoft started a new conversation How To Load Animate & Error Handling In Vuejs

Currently working on Vuejs, please how can i load Animate when request OR posting data through ajax and also, how can i handle error split from the backend?? Thanks

samsoft started a new conversation Reference Sub-domain

I'm trying to get sub domain using the following i found on laravel documentation,

Route::group(['domain' => '{tenant}.*'], function () {
    Route::get('user/{id}', function ($account, $id) {
        //
    });
});

but i'm unable to access the tenant name from the RouteServiceProvider. Please i'm missing anything?

28 Jul
3 years ago

samsoft left a reply on Multi-Tenancy App

Thanks @Istables have you used this library before? if so... how do you implement it?

samsoft started a new conversation Tenancy In Laravel

Any laravel library available to develop multi-tenancy application?

24 Jul
3 years ago

samsoft left a reply on Error: "-":2: Bad Command

Thanks, i finally resolve the issue -d register_argc_argv=On

php -d register_argc_argv=On /path/to/artisan schedule:run 1>> /dev/null 2>&1

samsoft started a new conversation Cron On GoDaddy

i'm currently having challenge adding cron link to my cpanel host on godaddy,

* * * * * php /path/to/local/artisan schedule:run 1>> /dev/null 2>&1

its split Error: "-":2: bad command, any typo mistake or i'm adding a wrong param

samsoft left a reply on Run Console Command Every 15 Minutes

Please can you make reference to the document? i need knowledge on how to setup the cron job

25 Jun
3 years ago

samsoft left a reply on Angular And Laravel: Real World Example App ?

I'm currently working with angular and lumen right now but hard a little problem about authentication, back to your question... check out this git

https://github.com/bestmomo/lumenangular

samsoft started a new conversation Lumen Auth Return Null After Login

Please, how do i persist the authentication in Lumen, after this $index = Auth::attempt(['email' => 'Krystal55@hotmail.com', 'password' => 'password'], 1); i dump dump($this->auth->user()) return null

24 Jun
3 years ago

samsoft started a new conversation Enable Authentication In Lumen

Working with Lumen but in the process, i discovered i need to make use of Authentication, please how can i enable it?

23 Jun
3 years ago

samsoft left a reply on Lumen And Angularjs

Thanks @bestmomo, where do you store your templates?

samsoft started a new conversation Lumen And Angularjs

Friends, i'm currently working on a project using Lumen and Angularjs, Please, how do i structured the directories for angularjs in lumen. Thanks!

22 Jun
3 years ago
21 Jun
3 years ago

samsoft started a new conversation Get Id Of A Table

Friends, please how can i get the id of another table from database? I've use the code below but it didn't work out.

$factory->define(App\ParentGuadian::class, function ($faker) {
    return [
        'name'              =>    'Ovia North/East Local Government, Okada',
        'state_of_orign'    =>    'Edo State', //$faker->email,
        'phone'             =>    $faker->phoneNumber,
        'address_id'        =>    'factory:App\Address',
        'child_id'          =>    'factory:App\Child',
        'parent_relationship_type_id'   =>    'factory:App\Child',
    ];
});

$factory->define(App\LocalGovtArea::class, function ($faker) {
    return [
        'lga_name'    =>    'Ovia North/East Local Government, Okada',
        'lga_code'       =>  str_random(5), //$faker->email,
        'address_id'   =>    'factory:App\Address',
    ];
});

$factory->define(App\Address::class, function ($faker) {
    return [
        'address'    =>    'Ovia North/East Local Government, Okada',
        'city'       =>    'Okada', 
    ];
});

20 Jun
3 years ago

samsoft started a new conversation Where Is 'php Artisan Tinker' In Lumen?

Please guyz, how do i install or enable tinker in Lumen?