Luis100079

Luis100079

Member Since 8 Months Ago

Experience Points
2,910
Total
Experience

2,090 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
13
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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.

Level 1
2,910 XP
Jul
28
1 month ago
Activity icon

Replied to Httpd Showing Index.html As Welcome Page

Thank you for your reply @snapey, the index.html file is the one located in the publi folder, to be honest I don't know whats going on, this is the first time i load laravel from httpd, i will delete index.html so then hopefully it works, thank you.

Activity icon

Started a new Conversation Httpd Showing Index.html As Welcome Page

Sorry to bother you guys with this dump question, Why when i get into my laravel app (example.com) i am received by the index.html page, instead of the login page?

Jul
08
2 months ago
Activity icon

Awarded Best Reply on Create Model Based On Migration


php artisan make:model Product

Activity icon

Replied to Create Model Based On Migration


php artisan make:model Product

Activity icon

Started a new Conversation Create Model Based On Migration

Hi, thanks for reading

How may I create a model based on a migration o table that already exists?

for example letś suposse have a existing migration and a table called "products", then I would like to create a model for that migration.

Thanks in advance...

Jul
05
2 months ago
Activity icon

Started a new Conversation Get Client Id From Traits

Hi

im trying get the client id

using " auth()->user()->id " in a trait but i just returns the following error:

"PHP Notice: Trying to get property 'id' of non-object in /home/luis/sn/app/Traits/Likable.php on line 11"

my trait code is:


<?php

namespace App\Traits;

use App\User;

trait likable{

    public function like($user = null){

        $user = $user ?: auth()->user()->id;

        return $this->likes()->attach( $user );

    }

    public function likes(){

        return $this->morphToMany(User::class, 'likable')->withTimestamps();

    }

}

So don't know what's going on, maybe i can not use "auth()->user()" in traits?

Thank you very much in advance

Jul
03
2 months ago
Activity icon

Started a new Conversation How To Access Component Data Outside Export?


<template>
  <div id="app">
    Hello {{msg}}

  </div>
</template>

<script>   

export default {
  name: "App",  
  data() {
    return { 
        msg: "World"
    }  
}

}

console.log(this.msg)

</script>

Jul
02
2 months ago
Activity icon

Started a new Conversation PHP Notice: Undefined Variable: Num In Psy Shell Code On Line 4

Hi

For some reason php can not read the variable $num, I get this error "PHP Notice: Undefined variable: num in Psy Shell code on line 4" when running this code:

App\Chat::where(function ($query) { $query->where('from', 1 )->where('to', $num ); })->orWhere( function ($query) { $query->where('from', $num )->where('to',1); })->where( 'from', $num )->get()

I had previously defined $num = 1;

the code works only if i put directly the number 1 in the code instead of the variable $num

So why php can not read the $num variable?

Activity icon

Started a new Conversation Select * From Chats Where `from` = 1 && `to` = 2 || `from` = 2 && `to` = 1;

Hi

How may I use this query ( select * from chats where from = 1 && to = 2 || from = 2 && to = 1 ) in Laravel ( im using mysql )?

I actualliy want to use that query in the " ->where() " at the end of the line below (I would apreciate that or any other valid approach for setting that conditional in the line below.... thanks... ) :

User::findOrFail( 1 )->chat_received->where()
Jun
30
2 months ago
Activity icon

Replied to Error: BadMethodCallException Method Illuminate\Database\Eloquent\Collection::with Does Not Exist.

thanks

I tried but i got this error:

(sorry I did not mention "myFollowers" is a "hasmany relationship")

Illuminate\Database\Eloquent\RelationNotFoundException
Call to undefined relationship [chat_received] on model [App\Follower].
Activity icon

Started a new Conversation Error: BadMethodCallException Method Illuminate\Database\Eloquent\Collection::with Does Not Exist.

return $user->myFollowers->with('chat_received:id,message');

that does not work,

Error: BadMethodCallException Method Illuminate\Database\Eloquent\Collection::with does not exist.

any idea guys?

Activity icon

Started a new Conversation Use With() In Collections

return $user->myFollowers->with('chat_received:id,message');

that does not work,

Error: BadMethodCallException Method Illuminate\Database\Eloquent\Collection::with does not exist.

any idea guys?

Jun
24
2 months ago
Activity icon

Started a new Conversation Laravel Websockets - Laravel Echo Can Not Listen Events From Fronted

I get this error message from the browser console:

WebSocket connection to 'wss://localhost/app/d9461b0680b177d5911e?protocol=7&client=js&version=6.0.3&flash=false' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
Activity icon

Commented on Hello Socket.io

Bro how will be able to authenticate laravel users with nodejs when making requests to the server?

Activity icon

Replied to Is Pusher Free Or How Long Can I Use Its Service For Free ??

how to authenticate laravel users with nodejs?

Jun
23
2 months ago
Activity icon

Replied to Undefined Variable: Students (View: D:\exam\curd\resources\views\home.blade.php)


  public function index()
    {
        $students = Student::all();
        return view('home', ['students' => $students] );
    }
Activity icon

Awarded Best Reply on Authenticate Laravel Users With Nodejs

Thank you bro. But the best solution is in this tutorial: https://laracasts.com/series/real-time-laravel-with-socket-io

I could not follow that tutorial cause i was having issues using redis but now i have fixed it by uninstalling predis from composer, and running php artisan config:clear. now it works

Activity icon

Replied to Authenticate Laravel Users With Nodejs

Thank you bro. But the best solution is in this tutorial: https://laracasts.com/series/real-time-laravel-with-socket-io

I could not follow that tutorial cause i was having issues using redis but now i have fixed it by uninstalling predis from composer, and running php artisan config:clear. now it works

Activity icon

Awarded Best Reply on Please Make Sure The PHP Redis Extension Is Installed And Enabled.

I finally fixed it;

I removed predis from composer by running

composer remove vendor/predis

and then ran

php artisan config:clear

(i had previously installed predis by doing "composer require predis/predis, but apparently that was the problem")

I don know what exactly is going on but I will find out later, jajajaja, this may help some body else in the future. never give up !

Activity icon

Replied to Please Make Sure The PHP Redis Extension Is Installed And Enabled.

I finally fixed it;

I removed predis from composer by running

composer remove vendor/predis

and then ran

php artisan config:clear

(i had previously installed predis by doing "composer require predis/predis, but apparently that was the problem")

I don know what exactly is going on but I will find out later, jajajaja, this may help some body else in the future. never give up !

Activity icon

Started a new Conversation Authenticate Laravel Users With Nodejs

Hi

Is there any propper way to authenticate laravel users with nodejs?. I have a small chat system with nodejs and socket.io and i want to use it in my laravel project. thanks for reading...

Activity icon

Replied to Please Make Sure The PHP Redis Extension Is Installed And Enabled.

Thanks, redis cli works, but I still have the problem.

Activity icon

Replied to Please Make Sure The PHP Redis Extension Is Installed And Enabled.

Thanks for the reply, but it does not work i tried in both .env & config/database.php Something i did not mention is i can't find anything related to redis in my php.ini file. Anyways thank you.

Jun
22
3 months ago
Activity icon

Started a new Conversation Please Make Sure The PHP Redis Extension Is Installed And Enabled.

Hi,

im just trying to use the redis facade, but i get the error: Please make sure the PHP Redis extension is installed and enabled.

I already run "composer require predis/predis", but it still does not work,

Im using ubuntu 18.04.

any suggestion guys?, thanks in advance

Activity icon

Started a new Conversation Should I Use Redis Or Mysql For Chat System?

Which one should i use and why? Or is it ok to use mysql for that? Thanks....

Activity icon

Started a new Conversation Laravel Echo Vs Socket.io

what are the diferent use cases?

Activity icon

Awarded Best Reply on How Can I Use Vuex In Laravel?

I just had to add this to my view:

(I actually asked this question because when working just with vue cli, there is not need to import store in the views)

Import store from "../store/index.js"

export default{

    store: store;

}
Activity icon

Replied to How Can I Use Vuex In Laravel?

I just had to add this to my view:

(I actually asked this question because when working just with vue cli, there is not need to import store in the views)

Import store from "../store/index.js"

export default{

    store: store;

}
Jun
21
3 months ago
Activity icon

Started a new Conversation Foreach( App\Post::all() As $post ){ Return $post->user->name; }

Hi

The code above only returns the first value [0], user is just a belongsTo() relationship

Thanks....

Activity icon

Started a new Conversation How Can I Use Vuex In Laravel?

How can i use vuex in laravel?

thanks...

Jun
19
3 months ago
Activity icon

Started a new Conversation Can't Call Apis When Using Parameters In Vue Router

apis do not work when defining page route with parameters as follows:

(in my vue router) { path: '/users/:id', component: Users }

then in my page i get the error: POST 405 (Method Not Allowed) when calling an api

but calling the api works when not using route params (id): { path: '/users; component: Users }

in page ive got the following code: axios.post('api/search', data).then( res => { console.log(res.data) } );

Im sure it is not about axios, something be going on with my routes, by the wat my web.php file allows vue routes as follows: Route::get('/{any?}', function () { return view('welcome'); })->where('any', '[/\w.-]*')->middleware('auth');

Activity icon

Started a new Conversation Error = POST 405 (Method Not Allowed) When Including Parameters On Vue Router

im getting that error when making a post request with axios,

axios.post('api/search_user', { value: 1 } ).then( res => { console.log( res.data ) } );

That works when my page url path is just ( path: '/users)', but when i include parametes in my route ( path: '/users/:id', ) i get that error ( POST 405 (Method Not Allowed )

Thanks...

Jun
17
3 months ago
Activity icon

Awarded Best Reply on 413 (Payload Too Large)

This is crazy.

I had to configure also the cli/php.ini file (/etc/php/7.2/cli/php.ini). I did the same configuration there. solved

Activity icon

Replied to 413 (Payload Too Large)

This is crazy.

I had to configure also the cli/php.ini file (/etc/php/7.2/cli/php.ini). I did the same configuration there. solved

Activity icon

Started a new Conversation 413 (Payload Too Large)

Hi, Im trying to upload some videos to the server, but i get this error in the browser console:

+++ POST 413 (Payload Too Large) ***

and also this error directly by php:

**** POST Content-Length of 60051073 bytes exceeds the limit of 8388608 bytes. ***

I already configured php.init by setting;

post_max_size = 200M &

upload_max_filesize = 100M.

But it does not work yet

thanks for reading

Jun
15
3 months ago
Activity icon

Replied to Use Both Vuejs And Laravel Routes

OMG, You have been my salvation, thanks

Activity icon

Started a new Conversation Use Both Vuejs And Laravel Routes

Hi, Id like to use both vuejs and laravel routes,

in the web.php routes file ive put Route::get('/{any?}'); However then i can not use the laravel routes only the vue ones.

Activity icon

Started a new Conversation Using Blade @can Directives Inside Vuejs Component

How to use blade @can directives inside vuejs component ?, thanks

Activity icon

Started a new Conversation .

.

Jun
11
3 months ago
Activity icon

Replied to Any “famous” Sites Built With Laravel?

That is no an answer to his question.

Jun
09
3 months ago
Activity icon

Commented on Laravel Valet Is Your Best Friend

What about linux users :( mac is made for princess not for developers.

Activity icon

Commented on Laravel Passport

How can i use it with GraphQl, it wouod be great to have a screencast about it. Thanks

Activity icon

Commented on Generating New Tokens

For those who are asking for the next episode, Tylor otwell did a great job by creating this screencast about laravel passport which is the solution that we are looking for and even more information about Rest API implementation in laravel, check this out: https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/13

Activity icon

Commented on Generating New Tokens

For those who are asking for the next episode, Tylor otwell did a great job by creating this screencast about laravel passport which is the solution that we are looking for and even more information about Rest API implementation in laravel, check this out: https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/13

Jun
08
3 months ago
Activity icon

Commented on Generating New Tokens

For those who are asking for the next episode, Tylor otwell did a great job by creating this screencast about laravel passport which is the solution that we are looking for and even more information about Rest API implementation in laravel, check this out: https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/13

May
19
4 months ago
Activity icon

Started a new Conversation @error Blade Directive Not Working

Hi im using the latest laravel version and ive been trying to use the blade "@error" directive but it does not work, it is not even highlight when i type it in my text editor (vscode) basically it does nothing as if it were not installed, how could i fix it? thanks for reading.