samsoft

Experience

15,490

1 Best Reply Awards

  • Member Since 4 Years Ago
  • 140 Lessons Completed
  • 0 Favorites

12th February, 2016

samsoft left a reply on I Need Help With Laravel 5.2 Multi Auth • 2 years ago

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 • 2 years ago

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

11th February, 2016

samsoft started a new conversation Mass Insertion On Two Model • 2 years ago

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?

10th February, 2016

samsoft left a reply on Laravel 5.2 Multi Auth • 2 years ago

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

9th February, 2016

samsoft left a reply on Scary Laravel Update • 2 years ago

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

8th February, 2016

samsoft left a reply on Scary Laravel Update • 2 years ago

@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 • 2 years ago

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

16th October, 2015

samsoft left a reply on How To Hide .env File • 2 years ago

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 • 2 years ago

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 • 2 years ago

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

13th October, 2015

samsoft left a reply on Barcode With Laravel 5.1 • 2 years ago

"dinesh/barcode" is not available, any alternative

20th September, 2015

samsoft left a reply on How To Get Storage Directory • 3 years ago

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 • 3 years ago

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

7th September, 2015

samsoft left a reply on Many To Many Problem, Please Help! • 3 years ago

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! • 3 years ago

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! • 3 years ago

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);

11th August, 2015

samsoft left a reply on Best And Secure Api Authentication • 3 years ago

@neomerx appreciate.... keep them coming!

7th August, 2015

samsoft started a new conversation Best And Secure Api Authentication • 3 years ago

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

samsoft left a reply on MorphTo Relationship Issue • 3 years ago

Thanks @pmall corrected!

samsoft left a reply on MorphTo Relationship Issue • 3 years ago

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

samsoft started a new conversation MorphTo Relationship Issue • 3 years ago

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 !!!

5th August, 2015

samsoft left a reply on PHP To JavaScript Not Working In 5.1 • 3 years ago

@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 • 3 years ago

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.

4th August, 2015

samsoft started a new conversation Display Doc & PDF On Web Broswer • 3 years ago

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 • 3 years ago

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 • 3 years ago

Thanks @bimalshah72, it works... Thanks

samsoft left a reply on Vuejs And Summernote • 3 years ago

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 • 3 years ago

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 • 3 years ago

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

1st August, 2015

samsoft left a reply on Vuejs Need Help • 3 years ago

Thanks @bestmomo , it work perfectly...

31st July, 2015

samsoft left a reply on 422 (Unprocessable Entity) Help • 3 years ago

Thanks.. i've resolve it!

samsoft started a new conversation 422 (Unprocessable Entity) Help • 3 years ago

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 • 3 years ago

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"

30th July, 2015

samsoft started a new conversation Vuejs Select Dropdown • 3 years ago

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 ? • 3 years ago

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 • 3 years ago

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 • 3 years ago

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?

28th July, 2015

samsoft left a reply on Multi-Tenancy App • 3 years ago

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

samsoft started a new conversation Tenancy In Laravel • 3 years ago

Any laravel library available to develop multi-tenancy application?

24th July, 2015

samsoft left a reply on Error: "-":2: Bad Command • 3 years ago

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 • 3 years ago

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 • 3 years ago

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

25th June, 2015

samsoft left a reply on Angular And Laravel: Real World Example App ? • 3 years ago

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 • 3 years ago

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

24th June, 2015

samsoft started a new conversation Enable Authentication In Lumen • 3 years ago

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

23rd June, 2015

samsoft left a reply on Lumen And Angularjs • 3 years ago

Thanks @bestmomo, where do you store your templates?

samsoft started a new conversation Lumen And Angularjs • 3 years ago

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

22nd June, 2015

samsoft left a reply on How To Solve CURL Error 60: SSL Certificate In Laravel 5 While Facebook Authentication • 3 years ago

@eddy1992 what version of guzzlehttp/guzzle are you using?

21st June, 2015

samsoft started a new conversation Get Id Of A Table • 3 years ago

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', 
    ];
});

20th June, 2015

samsoft started a new conversation Where Is 'php Artisan Tinker' In Lumen? • 3 years ago

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

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.