Robstar

Member Since 5 Years Ago

Developer at F9 Web Ltd.

Experience Points 125,520
Experience Level 26

4,480 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 1124
Lessons
Completed
Best Reply Awards 20
Best Reply
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.

07 Jun
1 week ago

Robstar left a reply on Create An Up To Date Feed

@MUSHOOD - Chaining definitely works, have just quickly tried here :)

Robstar left a reply on How To Change Title With Vue

@hjortur17 Have you looked in $refs -https://vuejs.org/v2/guide/components-edge-cases.html#Accessing-Child-Component-Instances-amp-Child-Elements

To be honest I'm not 100% sure what you're trying to achieve.

Robstar left a reply on Create An Up To Date Feed

@MUSHOOD - Fairly sure you can chain the merge call on a collection.

Robstar left a reply on Laravel 5.8 @can Not Working

@irankhosravi This is the second thread I've seen in as many minutes from yourself where you fail to ask a good question. For example, what have you tried so far, what do your error logs state, show us some relevant application code to help debug.

Give people a chance.

Robstar left a reply on Check If Model Has Changed Since First Save

@MTHOMAS - Not sure that is what the OP is asking.

Robstar left a reply on SyntaxError: Redeclaration Of Const SelectElement

@irankhosravi This whole thread illustrates why asking an unclear and poorly documented question yields no results.

I'd recommend you take a step back and read https://stackoverflow.com/help/how-to-ask. When you ask good questions, you'll get better answers.

Personally, I believe Laracasts is in need of sticky similar to https://stackoverflow.com/help/how-to-ask that is pinned to the top of each forum section. @jeffreyway ?

Robstar left a reply on Mix And Mdbootstrap

There also appears to be a Vue specific version at https://mdbootstrap.com/docs/vue/getting-started/download/, which should be very easy to use the default Laravel Mic setup.

Robstar left a reply on Laravel Scout Get Relationship Data On Search

@MEVLUTOZDEMIR - Just to improve the answer from @mevlutozdemir and @somewhat, you could use Laravel's tap() helper, allowing you to have a single return from your method call:

return tap(User::search($phrase)->paginate(25), function ($users) {
    /** @var \Illuminate\Database\Eloquent\Collection $users */
    return $users->load('dealer');
});
05 Jun
1 week ago

Robstar left a reply on Update Laravel

NOte sure what you're asking, as the error is clearly explained in your original post i.e. "the requested PHP extension zip is missing from your system"

Robstar left a reply on Assessing A Web Application Built By Someone Else

What specifically are you "asessing"?

Robstar left a reply on Bulk Send Mail With Notification

@amir-ali I'd strongly suggest you read the documentation at https://laravel.com/docs/5.8/queues, that explains the basics.

Notifications can also be queued as explained in the docs https://laravel.com/docs/5.8/notifications#queueing-notifications

In relation to your last reply I think you're missing the point about queue drivers. You can write say your mailables to be queueable.

If your queue driver is set to "sync" the mail will be sent immediately. If the queue driver is set to an in memory solution like Redis, the email will not be sent immediately. Instead, it is pushed onto the queue. Some additional setup is required for that though. You can also use Laravel Horison to view those queued jobs.

Robstar left a reply on Using Other Options Instead Of Id In Slug?

@chron This is all explained, in detail, within the Laravel docs - https://laravel.com/docs/5.8/routing#route-model-binding

Robstar left a reply on Personalized Password Recovery Laravel 5.8

Why would you do this? So unnecessary.

03 Jun
2 weeks ago

Robstar left a reply on Decrement Stock Product Quantity As Per Ordered

This will obviously depend upon your database structure, as you haven't provided this we can only guess.

But assuming it was simple and you wish to record the most basic changes, the query you'd run would be would be:

UPDATE stock SET quantity = quantity - [NUMBER_SOLD] WHERE product_id = [PRODUCT_ID] AND store_id = [STORE_ID]

Personally I'd also have a table that stores each stock adjustment so the stock level is traceable.

You can of course clean that up using the Fluent query builder or Eloquent.

Robstar left a reply on How To Get Mobile Number In Session Of Laravel?

@MAHAVEER - This is all extremely bread and butter stuff that can be explained by reading the Laravel docs.

In your controller, when processing the post:

session()->put('mobile', $request->mobile);

Then elsewhere:

$mobile = session()->get('mobile');

In the latter instance you'd need to validate / sanitise any data you fetch from the session.

31 May
2 weeks ago

Robstar left a reply on Brownfield Testing

To start, look at the business critical parts of the application and test those first. For instance, if inheriting a shop, you could maybe unit test the order service. In situations like this I always look at what parts would cause me the most issues if they were to break. I usually end up writing at least unit tests for those parts where I require confidence they are working.

29 May
2 weeks ago

Robstar left a reply on Associative Array In Console, But Not In View

@ftiersch you'll also need to update your Vue component to accept the passed prop.

Robstar left a reply on Help With Functions

You need to import which functions you require. i.e.

import { findByKey } from './vuex-reusable-functions'

Robstar left a reply on Vue V-model

Surely that's better as a computed property.

28 May
3 weeks ago

Robstar left a reply on Laravel - E-Commerce - Suggestion

@SIMANT - Bagisto looks pretty nice

Robstar left a reply on Laravel 5.9 Wish List

@SHEZ1983 - Yep, so why do you need additional functionality? :)

17 May
1 month ago

Robstar left a reply on How To Add Pagination To This Code

@MICHALIS - Fair enough, but an example titled 'basic example' is at the top of the page and states exactly what you need to do - https://laravel.com/docs/5.8/pagination#basic-usage :)

Robstar left a reply on Best Autocomplete For Laravel Projects With MySQL Backend

@WALLYJ - You'd want to keep the button there, clickable for usability.

The autocomplete may suggests a small amount of recommended results, each of which can be clicked upon.

You'd also want to allow users to search and display all results on a separate page.

If you want things to happen when a user clicks the result (other than visiting a new url) I'd recommend Vue.

Robstar left a reply on How Do You Install A Vue.js Package Into Laravel?

@CONNECTEEV - You'd pout the component where you wish it to display within your Vue application.

I'd recommend watching a beginner series on Vue so you know the basics.

15 May
1 month ago

Robstar left a reply on Vue Implementation Advice

Yep, Vue and Laravel (assume you'd be using that for backend API) would be fine. If you have lot's of state I'd recommend Vuex.

Robstar left a reply on Images Uploaded In Storage Not Accessible

Symlinks rarely work on shared hosting. You'll need to ask your host to create the symlink for you. You should look at this an opportunity to get some decent hosting :)

Robstar left a reply on How To Add Pagination To This Code

@michalis there is an entire page on the Laravel documentation about pagination. See https://laravel.com/docs/5.8/pagination

Robstar left a reply on Best Autocomplete For Laravel Projects With MySQL Backend

@WALLYJ - You're looking to build an 'auto suggest' / 'auto complete' search feature. You'd want clickable suggestions to show as you type and a separate screen that displays all results if the user actually submits the search form.

Robstar left a reply on Best Autocomplete For Laravel Projects With MySQL Backend

@WALLYJ - Fair enough. Even using plain JavaScript or jQuery it's pretty straightforwards to built yourself. There are a lot of jQuery plugins for this, but the majority of them are huge.

Robstar left a reply on Loading Vue

@rubiotv You'll need to show some code.

Robstar left a reply on How Do You Install A Vue.js Package Into Laravel?

@connecteev I've just had a quick browse of https://github.com/chenjiahan/vodal

Everything is explained. What don't you understand exactly?

Robstar left a reply on Laravel Multiple Slugs

@KEIZAH - See https://laravel.com/docs/5.8/routing#named-routes i.e.

Route::get('user/{id}/{token}/profile', function ($id) {
    //
})->name('profile');

$url = route('profile', ['id' => 1, 'token' => 'xyz']);
14 May
1 month ago

Robstar left a reply on Best Autocomplete For Laravel Projects With MySQL Backend

I'm unsure why you'd use a plugin for something so simple. I'd personally use Vue for this.

13 May
1 month ago

Robstar left a reply on Where I Can Save Array For Blade?

@vig This is covered in detail on the Laravel documentation. With the greatest respect, try learning the absolute basics yourself first.

Robstar left a reply on Laravel Multiple Slugs

Personally I'd be writing a named route for this, with named parameters. This will enforce consistent route generation throughout your application.

Robstar left a reply on MP3 Upload

"best answer", so lol :/

Robstar left a reply on Laracasts Search

@digiproduct you're aware how to press enter and use your arrow keys? :)

Robstar left a reply on Laravel 5.9 Wish List

@ROERJO - Plenty of 3rd party packages to do that for you. I'd be extremely surprised to see a documentation generator in Laravel. Taylot is actually trying to make the framework leaner, not add to it unnecessarily - https://twitter.com/taylorotwell/status/1127660049457766401

Robstar left a reply on Laravel 5.9 Wish List

@CODINGISEASY - No reason why you can't create that yourself. I'd be surprised to see any further make:x commands the next release.

Robstar left a reply on Laravel 5.9 Wish List

@SHEZ1983 - Why do you need extra packages to cache Eloquent queries? Caching is baked into the framework.

Robstar left a reply on Good Teacher ?

Tend to agree with @spectatorx as no technical details or a link to the source code have been provided./ Definitely appears to be self promotion.

Robstar left a reply on Cannot Watch On LG Smart TV

Alternatively, download the video files to a flash drive and play them that way. Pretty much every smart TV has the necessary codecs to play .mp4 files. Could also hookup your laptop and TV via HDMI and watch that way.

10 May
1 month ago

Robstar left a reply on Not Working Show Function In Laravel 5.7

@msoft I'd highly advise reading the Laravel documentation i.e. https://laravel.com/docs/5.8/routing#route-parameters

Basic things like routing are covered in depth there.

Robstar left a reply on Encrypted Value In .env

This appears to be a bit of a none issue. If you literally just want an encrypted string in your ENV file I'd personally write a console command that can be ran ADHOC. I'd image you'll run into errors when attempting to do this on each request.

The console command would take a single argument, encrypt it and then write to your .env.

Your colleagues shouldn't have access to your .env file as it should be present only on your computer and not within the repository. If you're referring to the concern of someone physically using your workstation, on your account, then you really have larger worries than an encrypted password.

As to not avoid the obvious, can;t you use a fake password i.e. one not related to anything real?

Robstar left a reply on How To Fix 500 And 429 Errors With Axios ?

@davidpd you state earlier you got 500 errors :)

I think before you do anything you should make a decision of Vuex.

Your code has an odd mixture of Vuex and raw axios calls, which belong in your store (i.e. as an action). separate to the Vue component.

Whilst I can't read all your code as you haven't formatted it correctly, it appears you have a lot of going on in the mounted() call. Try counting how many API requests your component makes. Then try setting dynamic variables to a fixed variable to avoid an API call - does your app still hang?

Robstar left a reply on How To Dynamically Handle Role Permissions

@ASIFMUSHTAQ38 - There's no online tutorial I know of, I wrote it a while ago myself when I discovered the laravel-permissions package.

  • I have a single file (above) containing all my permissions (the route, icon and description keys are for my UI to manage permissions, with I built in Vue)
  • When I add / remove permissions I run a Laravel artisna command (system:sync-permissions)
  • This command loops through my array of permissions. If the permission does not exist in the database it creates it

Robstar left a reply on SALES INVOICE

@EMFINANGA - Try using jQuery's trigger method on page load - http://api.jquery.com/trigger/

Everything would be much easier if you used Vue, as that would allow a more data centric approach to your UI.