ABasso

ABasso

Member Since 3 Years Ago

Halifax

Experience Points 153,230
Experience Level 31

1,770 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 1518
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

12 Aug
1 week ago

ABasso started a new conversation Email Verification 403 Invalid Signature If Time Expires

and you register user work okay. email is sending work okay

now if wait time to expire and click on the link to verify got response error 403.

anyone know why?

sorry, my bad English.

06 Jul
1 month ago

ABasso left a reply on Error On PHPUnit

well on Windows passes no issues.

on Linux, this is error file can't be found.

1) Tests\Unit\CommandRouteGeneratorTest::file_is_created_with_the_expected_structure_when_named_routes_exist

Failed asserting that file "../tests/assets/js/test.js" exists.
05 Jul
1 month ago

ABasso started a new conversation Error On PHPUnit

my test passes on Windows but on Linux fail.

fail in this parte on test.

$this->assertFileEquals('../tests/assets/js/test.js', '../tests/assets/js/check.js');

any solution for this?

thanks for any help.

29 Nov
8 months ago

ABasso left a reply on Help Me Find Beta Away To This!

@MICHAELCHARLES - sorry for my bad English! :((

28 Nov
8 months ago

ABasso started a new conversation Help Me Find Beta Away To This!

hi guys or girls.

I have this file

export default (data1, data2, data3) => {
//   ******** ///
    return []
}

I call this function like this


import dataFunction from './data'

let data = dataFunction(data1,data2,data3)

// Sorry for English! :((

to know if the different way to call this file? or this is the only way to call this file

05 Sep
1 year ago

ABasso left a reply on Laravel 5.5 Does Not Create .env File Anymore?

Go to the folder where you put laravel and do

$sudo nano .env

12 Aug
2 years ago

ABasso left a reply on Vuex Initiation And Conditional Reload

vuex do have 4 stated actions, mutations, state, getters

actions call mutations save state hold data getters get the data

i'm learning too about vuex, that it is what i do understand so far.

04 Aug
2 years ago

ABasso left a reply on XMLHttpRequest

i did got beta results put this on

.htaccess

    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
    Header always set Access-Control-Max-Age "1000"
    Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, Origin, Authorization, Accept, Client-Security-Token"

ABasso left a reply on XMLHttpRequest

this is for vue-resource

Vue.http.options.emulateJSON = true

i did try but lucky. i dont got any where. :(

ABasso started a new conversation XMLHttpRequest

[XMLHttpRequest] cannot load 'https://vue-api.dev/api/v1/auth/login'. Response to preflight request doesnt pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://vue.dev' is therefore not allowed access.
[XHR] failed loading: OPTIONS

CORS

        return $next($request)
            ->header('Access-Control-Allow-Origin', '*')
            ->header('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE, OPTIONS')
            ->header('Access-Control-Allow-Headers', 'Content-Type, Authorization');

Vue

Vue.axios.defaults.baseURL = 'https://vue-api.dev/api/v1';
Vue.axios.defaults.headers.common['Content-Type'] = 'application/json';
Vue.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
Vue.axios.defaults.headers.common['Accept'] = 'application/json';

what i need to do to fix that error?

23 Jul
2 years ago

ABasso left a reply on TypeError: Cannot Read Property 'hasOwnProperty'

i thinks i fix i did forgot to return to Errors class.

ABasso left a reply on TypeError: Cannot Read Property 'hasOwnProperty'

i thinks it is has a value

    /**
     *
     */
    constructor() {
        this.errors = {};
    }

ABasso started a new conversation TypeError: Cannot Read Property 'hasOwnProperty'

i did got this error

[Vue warn]: Error in render function: "TypeError: Cannot read property 'hasOwnProperty' of undefined"
    /**
     * @param {string} field
     * @returns {boolean}
     */
    has(field) {
        return this.errors.hasOwnProperty(field);
    }

anyone know why?

24 Oct
2 years ago

ABasso left a reply on Help Me Understand This Error.

nice will work if i is like this

'body' => $faker->sentences(4, true),

it's good to know that.

ABasso left a reply on Help Me Understand This Error.

did change

'body' => $faker->paragraph,

ABasso started a new conversation Help Me Understand This Error.

    Schema::create('topics', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned()->index();
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
            $table->string('name');
            $table->string('slug');
            $table->text('body');
            $table->timestamps();
    });
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(App\User::class, function (Faker\Generator $faker) {
    return [
        'username' => $faker->userName,
        'email' => $faker->unique()->safeEmail,
        'remember_token' => str_random(10),
    ];
});

$factory->define(App\Topic::class, function (Faker\Generator $faker) {
    $name = $faker->sentence;
    $id = App\User::inRandomOrder()->first();
    if ($id == null) {
        factory(App\User::class)->create();
        $id = App\User::inRandomOrder()->first();
    }
    return [
        'user_id' => $id['id'],
        'name' => $name,
        'slug' => str_slug($name),
        'body' => $faker->sentences,
    ];
});
class DatabaseSeeder extends Seeder
{
    public function run()
    {
        factory(User::class, 10)->create();
        factory(Topic::class, 30)->create();
    }
}

give this error

[Illuminate\Database\QueryException]
  Array to string conversion (SQL: insert into `topics` (`user_id`, `name`, `slug`, `body`, `updated_at`, `created_at`) values (9, Asperiores a omnis enim deserunt., asperiores-a-omnis-enim-deserunt, Aut ullam delectus dolorem nemo ut aut aut., 2016-10-24 09
  :10:59, 2016-10-24 09:10:59))



  [ErrorException]
  Array to string conversion

any one know why? where i did make the mistake. thank you for any help.

09 Sep
2 years ago

ABasso left a reply on Laravel 5.3 Mail Send And Queue Error

i did find what is wrong

command=php /var/www/laravel/artisan queue:work database  --sleep=3 --tries=3

this is work

command=php /var/www/laravel/artisan queue:work  --sleep=3 --tries=3

ABasso left a reply on Update Laravel Installer Version

on file laravel inside folder

C:\Users\Alexandre Basso\AppData\Roaming\Composer\vendor\laravel\installer

you see this

#!/usr/bin/env php
<?php

if (file_exists(__DIR__.'/../../autoload.php')) {
    require __DIR__.'/../../autoload.php';
} else {
    require __DIR__.'/vendor/autoload.php';
}

$app = new Symfony\Component\Console\Application('Laravel Installer', '1.3.3');
$app->add(new Laravel\Installer\Console\NewCommand);

$app->run();

it is not been change.

ABasso started a new conversation Laravel 5.3 Mail Send And Queue Error

hello.

if i use queue i do got error 530 5.7.1 Authentication required

Mail::to($user)->queue(new Registered($user));

but if i use send the email is send ok.

Mail::to($user)->send(new Registered($user));

anyone know why?

08 Sep
2 years ago

ABasso left a reply on With Configuration Homestead Have For Supervisor?

finally i find the way to make work.

# SUPERVISOR
sudo nano /etc/apt/sources.list 
    #add this lines
    deb http://us.archive.ubuntu.com/ubuntu xenial main universe
    deb-src http://us.archive.ubuntu.com/ubuntu xenial main universe

sudo apt-get update
sudo apt-get install -y supervisor
    # start supervisor
    sudo supervisord -c /etc/supervisor/supervisord.conf

ABasso started a new conversation With Configuration Homestead Have For Supervisor?

I have ubuntu 16.04.1 32bits.

i need know with config homestead use to make supervisor to work.

anyone know with configuration Homestead have for Supervisor?

23 Aug
2 years ago

ABasso left a reply on Query String Sometimes In Slug?

do you have the file on view folder?

VIEW

public function show($slug)
{
    return view("articles.{$slug}.show", [
        'articleDate' => Carbon::today()->subDays(2)->format('F j, Y'),
        'saleDate'    => Carbon::today()->addDays(2)->format('F jS')
    ]);
}

or ROUTE

public function show($slug)
{
    return route("articles.{$slug}.show", [
        'articleDate' => Carbon::today()->subDays(2)->format('F j, Y'),
        'saleDate'    => Carbon::today()->addDays(2)->format('F jS')
    ]);
}
02 Aug
3 years ago
28 Jul
3 years ago

ABasso started a new conversation Laravel Blade Javascript Need Help

need help

these two code work correctly. I would like to use the second code as it is easy to keep the route link in check. my problem and pass this part of javascript + event.target.id within the blade laravel {{route ('forum.delete-group', 'JavaScript code here')}}

it's possible?

<script>
$('.delete_group_id').click(function (event) {
        $('#delete_group_id').prop('href', '/forum/delete-group/' + event.target.id)
});
</script

or

<script>
$('.delete_group_id').click(function (event) {
        $('#delete_group_id').prop('href', '{{ route('forum.delete-group', '') }}/' + event.target.id)
 });
</script>
19 May
3 years ago

ABasso left a reply on Empty Data.

thank you friends for the help. from the bottom of my heart

ABasso left a reply on Empty Data.

It was a nightmare but is now working.

    public function postSignup(Request $request)
    {
        $validate = $this->validaterSignUp($request);
        if($validate->fails()) {
            return $this->sendFailedSignUpResponse($request, $validate);
        }
        return redirect()->intended();
    }

    protected function validaterSignUp(Request $request)
    {
        return Validator::make($request->all(), [
            'username' => 'required|min:3|max:50|unique:users,username',
            'email' => 'required|email|min:3|unique:users,email',
            'passwordR' => 'required|min:3|max:50',
            'confirm_password' => 'required|min:3|max:50|same:passwordR',
        ]);
    }

    protected function sendFailedSignUpResponse(Request $request, $validate)
    {
        return back()->withInput($request->all())->withErrors($validate)->with('RegisterUserModal', '#RegisterUserModal');
    }

ABasso left a reply on Empty Data.

router.php

<?php

Route::group(['prefix' => '/'], function ($route) {
    $route->get('', ['as' => 'home', 'uses' => '[email protected]']);

    $route->post('signin', ['as' => 'signin', 'uses' => 'Auth\[email protected]']);
    $route->post('signup', ['as' => 'signup', 'uses' => 'Auth\[email protected]']);
    $route->get('signout', ['as' => 'signout', 'uses' => 'Auth\[email protected]']);
});

AuthController.php

<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;

class AuthController extends Controller
{
    use LoginUsers, RegisterUsers;

    public function signOut()
    {
        auth()->guard()->logout();
        return redirect(route('home'));
    }
}

LoginUsers.php

<?php

namespace App\Http\Controllers\Auth;

use Lang;
use Illuminate\Http\Request;

trait LoginUsers
{
    public function postSignin(Request $request)
    {
        $this->validaterSignIn($request);
        $credentials = $this->getCredentials($request);
        if (auth()->guard()->attempt($credentials, $request->has('remember'))) {
            return redirect()->intended();
        }
        return $this->sendFailedSignInResponse($request);
    }

    protected function validaterSignIn(Request $request)
    {
        return $this->validate($request, [
            'identifier' => 'required',
            'passwordL' => 'required',
        ]);
    }

    protected function sendFailedSignInResponse(Request $request)
    {
        return back()->withInput($request->only('identifier', 'remember'))->withErrors(['loginfailed' => Lang::get('auth.failed')]);
    }

    protected function getCredentials(Request $request)
    {
        $field = ['identifier' => filter_var($request->input('identifier'), FILTER_VALIDATE_EMAIL) ? 'email' : 'username', 'password' => 'password'];
        $request->merge([$field['identifier'] => $request->input('identifier'), $field['password'] => $request->input('passwordL')]);
        return $request->only($field);
    }
}

RegisterUsers.php

<?php

namespace App\Http\Controllers\Auth;

use App\Models\User;
use Illuminate\Http\Request;

trait RegisterUsers
{
    public function postSignup(Request $request)
    {
        $validate = $this->validaterSignUp($request);
        User::createUser($request->only('username', 'email', 'passwordR'));
        return $this->sendFailedSignUpResponse();
    }

    protected function validaterSignUp(Request $request)
    {
        $this->validate($request, [
            'username' => 'required|min:3|max:50|unique:users,username',
            'email' => 'required|email|min:3|unique:users,email',
            'passwordR' => 'required|min:3|max:50',
            'confirm_password' => 'required|min:3|max:50|same:passwordR',
        ]);
    }

    protected function sendFailedSignUpResponse(Request $request)
    {
        return back()->withInput($request)->withErrors(['RegisterUserModal' => '#RegisterUserModal']);
    }
}

that is all the changes i did.

ABasso left a reply on Empty Data.

so you think can be because this is in trait?

ABasso left a reply on Empty Data.

$validatoe

this was my mistake a few minutes ago when I was editing and not realize. no longer worked before that

ABasso left a reply on Empty Data.

input and validation errors work ok.

ABasso left a reply on Empty Data.

that did work ok.

Route::get('/test', function() {
    return redirect('/test2')->with('test', 'Test is working!');
});

Route::get('/test2', function() {
    dd(session()->get('test') ?? 'Test is NOT working');
});

ABasso left a reply on Empty Data.

php artisan route:list

+--------+----------+---------+---------+-----------------------------------------------------+------------+  
| Domain | Method   | URI     | Name    | Action                                              | Middleware |  
+--------+----------+---------+---------+-----------------------------------------------------+------------+  
|        | GET|HEAD | /       | home    | App\Http\Controllers\[email protected]            | web        |  
|        | POST     | signin  | signin  | App\Http\Controllers\Auth\[email protected]     | web        |  
|        | GET|HEAD | signout | signout | App\Http\Controllers\Auth\[email protected]    | web        |  
|        | POST     | signup  | signup  | App\Http\Controllers\Auth\[email protected] | web        |  
+--------+----------+---------+---------+-----------------------------------------------------+------------+  

registerUsers trait

<?php

namespace App\Http\Controllers\Auth;

use App\Models\User;
use Illuminate\Http\Request;

trait RegisterUsers
{
    public function postSignup(Request $request)
    {
        $validatoe = $this->validaterSignUp($request);
        if($validate->failed()) {
            return back()->with('RegisterUserModal', '#RegisterUserModal');
        }
        User::createUser($request->only('username', 'email', 'passwordR'));
        return back();
    }

    protected function validaterSignUp(Request $request)
    {
        $this->validate($request, [
            'username' => 'required|min:3|max:50|unique:users,username',
            'email' => 'required|email|min:3|unique:users,email',
            'passwordR' => 'required|min:3|max:50',
            'confirm_password' => 'required|min:3|max:50|same:passwordR',
        ]);
    }
}

ABasso left a reply on Empty Data.

middleware web on laravel 5.2 is by default

ABasso left a reply on Empty Data.

yes the route is middleware web.

ABasso left a reply on Empty Data.

return back()->with('RegisterUserModal', '#RegisterUserModal');

bool(false)

{!! var_dump(Session::has('RegisterUserModal')) !!}}

or

back()->withErrors(['RegisterUserModal' => '#RegisterUserModal']);

bool(false)

{!! var_dump($errors->has('RegisterUserModal')) !!}

ABasso left a reply on Empty Data.

I did try

{!! var_dump(Session::has('RegisterUserModal')) !!}}

I get same bool(false)

ABasso left a reply on [Laravel Elixir] Browserify Failed!: Unexpected Token

npm install laravel-elixir-vueify

in gulpfile add

require('laravel-elixir-vueify');

run gulp

try that

ABasso left a reply on Change Php Ini Settings For A Certain Route

check that out "upload_max_filesize"

ABasso left a reply on Redirect WithErrors Not Working

that can be a bug. I think. I did got the same problem.

ABasso left a reply on Empty Data.

thanks for the help . but still not working.

return back()->with('RegisterUserModal', '#RegisterUserModal');

var_dump show me bool(false)

{!! var_dump($errors->has('RegisterUserModal')) !!}

ABasso left a reply on Empty Data.

I find a fix

@if($errors->all())
    $('#RegisterUserModal').modal('show');
@endif

ABasso left a reply on Empty Data.

did I try

redirect()->back()->withErrors(['RegisterUserModal' => '#RegisterUserModal']);

but nothing not pass to blade template.

if I do a var_dump isn't there.

{{ var_dump(Session::all) }}
```

ABasso started a new conversation Empty Data.

i'm trying to pass some data to blade template. but seeing not working for me.

passing data.

return redirect()->back()->with('RegisterUserModal', '#RegisterUserModal');

getting the data.

$({{ $errors->has('RegisterUserModal') ? $errors->get('RegisterUserModal') : '' }}).modal('show')

if I do a var_dump it is empty.

anyone know why this happen?

sorry if I do not write with good English.