beyond

beyond

Member Since 8 Months Ago

Experience Points
860
Total
Experience

4,140 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
0
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
860 XP
Jul
27
2 weeks ago
Activity icon

Started a new Conversation Laravel Web-socket Private Channel Complaining About Cors

Access to XMLHttpRequest at 'http://127.0.0.1:8000/laravel-websockets/auth' from origin 'http://localhost:3001' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. POST http://127.0.0.1:8000/laravel-websockets/auth net::ERR_FAILED

is the error response that I get whenever I listen to a private channel and I have the spattie cors package installed form normal http REST api which works fine. Please how can I fixed cors issue with laravel web-socket private channel?

Jul
09
1 month ago
Activity icon

Replied to Limiting The Column String To 192

@siangboon Thanks for that information

Jul
08
1 month ago
Activity icon

Replied to Limiting The Column String To 192

Can I simply just put something like

public function boot() { Schema::defaultStringLength(2000); } ?

Activity icon

Replied to Limiting The Column String To 192

@michaloravec Thanks for that, I just want to set it to know limit like whatsapp kinda.

Activity icon

Started a new Conversation Limiting The Column String To 192

I was forced to change the Schema default string length to maximum of 192 when I wanted to create migration for deployment of which in production mode I was not forced to do that. Whenever I want to insert text more than 192 into the any column in the entire DB, It refuses to do that sending 500 error back. Please how can I fix this because users need to send message and limiting the length of message if a great issue?.

Jun
18
1 month ago
Activity icon

Replied to Database Queue On Shared Hosting

@dutta Please can you put me through, I am facing the same problem?

Jun
16
1 month ago
Activity icon

Replied to How To Access S3 Disk Files?

Thank you Sir

Jun
14
2 months ago
Activity icon

Started a new Conversation How To Access S3 Disk Files?

I use s3 disk in laravel and I save the files's full path in the database. I just want to fetch the path and use it in the image or video tag src. I get access denied response. Please can anybody help with this?

Jun
11
2 months ago
Activity icon

Replied to Unable To Run Artisan Migrate In Production.

It has been solved. I just saw the error in the migration schema

Activity icon

Started a new Conversation Unable To Run Artisan Migrate In Production.

This is what I get as error message when I tried to run php artisan migrate. Please I really need help with this.

Migrating: 2014_10_12_000000_create_users_table

Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'linkTimeOut' (SQL: create table participants (id bigint unsigned not null auto_increment primary key, firstName varchar(255) not null, lastName varchar(255) not null, email varchar(255) not null, userName varchar(255) null, profilePic varchar(255) null, phoneNumber varchar(255) null, type varchar(255) not null, active int not null default '1', role int not null default '0', email_verified_at timestamp null, password varchar(255) not null, linkTimeOut timestamp not null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

at /mediller.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669 665| // If an exception occurs when attempting to run a query, we'll format the error 666| // message to include the bindings with SQL, which will make this exception a 667| // lot more helpful to the developer instead of just the database's errors. 668| catch (Exception $e) {

669| throw new QueryException( 670| $query, $this->prepareBindings($bindings), $e 671| ); 672| } 673|

Exception trace:

1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'linkTimeOut'") /mediller.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:463

2 PDOStatement::execute() /mediller.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:463

Jun
10
2 months ago
Activity icon

Replied to How To Deploy Separate React Frontend App And Laravel Api Backend?

I truly still need hep on how to place the laravel folder on my cPanel to be able to get the api to api route php and return the expected data or will just upload the folder there and starts working? I have tries this and the API doest not even connect. please help me with this. Lokking forward to hearing from you soon.

Jun
09
2 months ago
Activity icon

Replied to How To Run Artisan Queue:listen Or Queue:work In Production?

Thanks for the reply Sir. I'll follow the link and get back to you about the result.

Activity icon

Started a new Conversation How To Run Artisan Queue:listen Or Queue:work In Production?

The tmdhosting I use provides no access to run commands on my CPANEL and my app is majorly dependent of queue for sending email and real time chat. How can make the queue:work and will queue work keep working permanently on the server if not code is updated without failing? I tried running Artisan::call('queue:listen') and Artisan::call('queue:work') through an api endpoint but it did not work, I even tested the method locally as well but did not work too. Please I really need help this.

Jun
07
2 months ago
Activity icon

Replied to Laravel Production.

Thanks for the reply Sir. You have always been there for me and I really appreciate you Sir.

Actually this is my first laravel app and I need to know how to manipulate the files on my CPANEL to be able to hit the endpoint inside the route/api.php because I am using the laravel app as API. Thanks in advance.

Activity icon

Started a new Conversation Laravel Production.

Please I want to prepare my laravel app for production. What are the steps to take? Is there anything like build like in javascript framewoks like npm build. Please enlighten me on this. I have a separate laravel app and and react front end as well. How do I write the endpoint for routes in the route.api in laravel or will this be just like it is while using xampp local host?

Jun
06
2 months ago
Activity icon

Started a new Conversation How To Deploy Separate React Frontend App And Laravel Api Backend?

have a separate react frontend app and separate laravel api app. In development I connect them and everything works fine by server the react with npm start and laravel artisan: serve separately. But now I want to move to production, please how do I position the react build file and laravel file on the server panel to enable my react access the api route in laravel? Please I really need help with this and looking forward to hearing from you soon. Thanks in advance.

Activity icon

Replied to Save Object Ignoring Extra Columns

I think I get what you mean slightly but not all.

You're trying to save a column that doesn't exist on the model? That would surely raise an error. I am sure create would not raise such error but only map the correct column if finds. May be you should try update by taking the stress of extra line and keep the correct current data if need return. You don't want to specifically list the columns right? You can copy the data unlink the not needed out of the associative array then save the rest.

Activity icon

Started a new Conversation How To Deployseparate React App And Laravel Api Back End?

I have a separate react frontend app and separate laravel api app. In development I connect them and everything works fine by server the react with npm start and laravel artisan: serve separately. But now I want to move to production, please how do I position the react build file and laravel file on the server panel to enable my react access the api route in laravel? Please I really need help with this and looking forward to hearing from you soon. Thanks in advance.

Apr
02
4 months ago
Activity icon

Replied to Having Trouble Looping Through Array In Blade (object Was Decoded From Json)

ok. To be sincere I am not used to blade, I only use laravel as API, but if you can tell me the essence of i$tem->attribute, I can help.

i seems to me as a simple Object of containing array. E.g

{ 'one':1, 'two':2, three:[1,2,3], four:[{'a': 10},{b:[5,6,7]},{....},] }

i believe this format is ok and can be manipulated any how we want it. You data and this look similar and I don't understand the part of decode().

please can you elaborate?

Activity icon

Replied to Tips For Getting A Grasp On Laravel MVC?

What do you really wanna build and which part do you need help with?

Activity icon

Replied to Jquery Question

Did you mean you want to upload files and collect them in an array?

Activity icon

Replied to HELP With Gallery Controller !! Please

simply use foreach( 'the file array' as $file){ //do the saving here , like:

$file->storeAs('path', 'file details necessary');

then you can perform any operation on each file like create, update, etc..

}

Mar
27
4 months ago
Activity icon

Replied to Laravel Echo Private Channel Not Working

Please I seriouly need help with this. Somebody should say something, please.

Activity icon

Started a new Conversation Laravel Echo Private Channel Not Working

I really need help with pusher private channel, Please help me out with this. I use react js as front end and laravel as API. The channel works well but the private complains that [Cannot POST /broadcasting/auth]. I can get both private and channel on my pusher console on Pusher account but the private doesn't work in my front end.

Mar
26
4 months ago
Activity icon

Started a new Conversation Now Notification And Inbox Implementation

Please how do I implement real-time for new inbox and notification with number of new messages and when clicked to mark to remove it like in Facebook notification and messenger new messages. Please I really need this.

Mar
24
4 months ago
Activity icon

Replied to Laravel Query

{ "id": 14, "description": "I am so happy today, Now let me post Pictures", "likes": 1, "created_at": "2020-03-19 23:28:15", "poster": { "userName": "name", "profilePic": "pic.jpg" }, "status_files": [ { "id": 37, "name": "5297.jpg", "status_post_id": 14, "likes": 1, "created_at": "2020-03-19 23:28:15" // I want to check if the current user was the one that liked the file. }, { "id": 38, "name": "5450.jpg", "status_post_id": 14, "likes": 0, "created_at": "2020-03-19 23:28:15" }, { "id": 39, "name": "537.jpg", "status_post_id": 14, "likes": 0, "created_at": "2020-03-19 23:28:15" }, { "id": 40, "name": "696.jpg", "status_post_id": 14, "likes": 0, "created_at": "2020-03-19 23:28:15" } ], "post_liked": null, "comments": [ { "id": 61, "status_post_id": 14, "comment": "Number 14, Comment on the status to see if it works", "created_at": "2020-03-21 14:05:45", "userName": "name", "profilePic": "profilePictures31.jpg" }, { "id": 62, "status_post_id": 14, "comment": "Number 14, Comment on the status to see if it works", "created_at": "2020-03-21 14:26:56", "userName": "beyond", "profilePic": "profilePictures34.jpg" }, { "id": 63, "status_post_id": 14, "comment": "Number 14, Comment on the status to see if it works", "created_at": "2020-03-21 14:27:04", "userName": "Mrpro", "profilePic": null },

    ]
},
Activity icon

Replied to Laravel Query

I want to achieve a tree like this:

Data:{ Post details, liked, // this checks the post like history table files:[ file one:{ details, liked // this should also check the files like history table but unable to achieve this for now and need help with it }, file two:{ details, }, etc... ], comments:[ comment one:{ details, commenter }, comment two:{ details, commenter }, etc... ] }

Activity icon

Started a new Conversation Laravel Query

Please I need with laravel complex query.

I have post table, post files table, post comments table, user table, post like monitor table, post files like monitor table.

i want to fetch post with files and comments and check if the user at the front end has already liked the post or each file associated with a particular post.

i could find my way with post and check if already liked, files, comments with commenter details, but it remains to check each files if already liked?

Here is the code so far:

return StatusPost::with([ // get poster details 'poster:id,userName,profilePic',

                // get associated files
/* This is the part I need help with by getting the row if the each file has been liked by the user from the post_file_like_monitors table*/
                'status_files',

                // get the row if the post has been liked by participant
                'post_liked'=>function($query){ 
                    $query->where('user_id', 1);
                },

                'comments'=>function($query){   //get the comment and commenters details
                    $query->join('users', 'user_id', '=','users.id')
                    ->select('status_post_comments.*', 'users.userName', 'users.profilePic');
                },
            ])
            ->whereIn('user_id', // Query to get the followings post 
                function($query){
                    $query->select('following_id')
                    ->from('followers')
                    ->where('followee_id', 2);
                }
            )
            ->orWhere('user_id', 3) // or the self post
            ->orderBy('created_at', 'DESC') // in latest mode
            ->get();

Below is the post Model:

class StatusPost extends Model {

public function poster(){ //get the poster details
    return $this->belongsTo('App\User', 'use_id', 'id');
}

public function status_files(){
    return $this->hasMany('App\StatusFile');
}

public function comments(){
    return $this->hasMany('App\StatusPostComment')->take(6);
}

public function post_liked(){
    return $this->hasOne('App\StatusPostLikeMonitor');
}

}