brightstormhq

brightstormhq

Booking now for September 2019 at Bristol

Member Since 1 Year Ago

Bristol

Experience Points
36,190
Total
Experience

3,810 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
318
Lessons
Completed
Best Reply Awards
5
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.

Level 8
36,190 XP
Jun
04
4 months ago
Activity icon

Replied to Csrf Or Honeyspot

neither are better. Add both.

Apr
23
5 months ago
Activity icon

Replied to PHP

You should be doing this $testData=$CommonClass->ResultWithArrayData("SELECT * FROM portfolio WHERE status=1 ORDER BY id DESC "); in your controller and then pushing the $testData into your view.

Be wary of how big your portfolio results are. Its fine when you've got a few, but your page size and db performance will suffer when your portfolio grows to a significant size.

Mar
27
6 months ago
Activity icon

Replied to Email / MX Hosting - What Solutions Do You Use?

We use Rackspace hosted Email https://www.rackspace.com/email-hosting/webmail - which is $2.99 per mailbox for 25GB

Oct
05
1 year ago
Activity icon

Replied to Subscription Renewal

I suspect you are talking about your subscription to laravel Forge? If so you’ll want to pick it up with customer service there not on Laracasts.

Sep
30
1 year ago
Activity icon

Replied to Protect Against Double Vote On An Article

In the testing laravel series, there is a whole episode dedicated to this https://laracasts.com/series/phpunit-testing-in-laravel/episodes/9 The approach would be to set up a primary key across several fields - in the above episode the likes are set as a morphmany relationship so the primary key uses user_id, likeable_id, likeable_type

Activity icon

Replied to Better Understanding Of Redis

A good place to start would be to look through the following series https://laracasts.com/series/learn-laravel-and-redis-through-examples

Sep
28
1 year ago
Activity icon

Replied to Tailwind CSS

@Eddie945 please choose a good comment (not your own), so that will help someone find the answer next time, and will let the answerer claim the 'reward' for best answer.

Activity icon

Replied to Tailwind CSS

This Modern CSS for backend developers series covers Tailwind https://laracasts.com/series/modern-css-for-backend-developers

Activity icon

Replied to Using Vue And Jquery

Just write your jquery in a script block and add to the bottom of your page below where you’ve loaded jquery in your app.js file. As your jquery shouldn’t fire until alp the Dom elements have loaded, calling it at the bottom of the page is fine.

Sep
27
1 year ago
Activity icon

Replied to How To Put 2 Tables In One Page

Neither of those methods pass the inventories array into your view.

It looks like you are editing an order so you’ll want to reference the $order->id in your blade rather than $inventories.

Sep
25
1 year ago
Activity icon

Replied to Git Branching Best Practices

An extension to using the feature branch workflow is GitFlow workflow. https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

"Gitflow is ideally suited for projects that have a scheduled release cycle. This workflow doesn’t add any new concepts or commands beyond what’s required for the Feature Branch Workflow. Instead, it assigns very specific roles to different branches and defines how and when they should interact. In addition to feature branches, it uses individual branches for preparing, maintaining, and recording releases. Of course, you also get to leverage all the benefits of the Feature Branch Workflow: pull requests, isolated experiments, and more efficient collaboration."

Sep
19
1 year ago
Activity icon

Replied to Laravel: Cache Store [predis] Is Not Defined In Illuminate\Cache\CacheManager.php

youll want to set your cache method to ‘redis’ rather than ‘predis’

Activity icon

Replied to How I Do Save In Two Db Table With Same Id

Can you add your model files so we can see the relationship between your two tables?

I’m curious why you are saving records in 2 tables as you can get whether something is new by the rows updated date.

1900 records in a database isn’t very much. If you are having performance and issues because of this iron these out by reviewing your queries and using laravels eloquent methods to talk to the database and also lazy loading as appropriate.

Sep
17
1 year ago
Activity icon

Replied to Seems Slow

I’d look installing a debugging tool such as Tracy https://github.com/recca0120/laravel-tracy which should give you some details on where your bottle neck is. It could also be an issue with your DNS if your app takes ages to respond. The network tab in chrome tools should help here.

Activity icon

Replied to Problem With Foreach On Update/save

@petritr can you show your model so i can understand the relationship you've set up? Feels like (if you are using a join table) then you can use sync()

eg

$hub->data()->sync([1, 2, 3]);
Sep
16
1 year ago
Activity icon

Replied to PHP Storm Laravel Integration

The Phpstorm ide helper package should help here https://github.com/barryvdh/laravel-ide-helper

Sep
14
1 year ago
Activity icon

Replied to Admin Panel

Laravel backpack has a good crud builder for this purpose https://laravel-backpack.readme.io/docs/getting-started

Activity icon

Replied to Problem With Foreach On Update/save

It looks like your array is showing a hasMany relationship. Hub has many data. If you define this in your models and set up an appropriate table then eloquent will deal with the save for you. Look at https://laravel.com/docs/5.7/eloquent-relationships for info

Activity icon

Replied to Modelling Data In Controller Results In: "htmlspecialchars() Expects Parameter 1 To Be String, Array Given"

If you could post whats in your blade file. I suspect you are trying to echo an array.

Sep
11
1 year ago
Activity icon

Replied to Query Is Takes Only First Id

@mkrahamath you can simplify the above by just setting your

$productIds = [1,2,3,5,6,8];

You are initially declaring a string of numbers and then turning that into an array when you could easily already define the array in the first place

Can you mark NOMGUYs answer as best answer so he picks up the credit for it?

Activity icon

Replied to Query Is Takes Only First Id

If you are only getting one record when passing in the array, check you actually have products with those ids in your database.

Installing a package such as Tracy will give you access to queries you are running in your UI which will allow scrutinise what’s running at db layer https://packagist.org/packages/recca0120/laravel-tracy

Activity icon

Replied to Query Is Takes Only First Id

You’ve defined your product ids as a string before passing that string to your query and wrapping it in brackets. Just create the array of ids first, and pass that in.

Sep
04
1 year ago
Activity icon

Replied to Sample

Can you supply a bit of context / code for this question?

Activity icon

Replied to Hey Guys. I Need Some Ideas. How Can I Use Javascript To Differentiate $ids Of Objects?

What different thing do you want to happen? Something like a modal pop up or slideshow?

Sep
02
1 year ago
Activity icon

Replied to Sorry, The Page You Are Looking For Could Not Be Found Error

I’ve not used the action helper instead preferring to create a route in routes.php and then reference the route in the form action. That way you can check the route is valid by running:

php artisan route:list

I think you also might need to post rather than put in your form method.

Activity icon

Replied to Can't Get Select Value - Laravel 5.5

You’ll only get values in your $request object as a result of a form submission.

If you want to filter your select you’ll need to wrap it in a form and submit a t to you index method which will give you access to the appropriate value you want to filter on

Aug
27
1 year ago
Activity icon

Replied to Create Vhost Apche2

Don’t forget you can also use the artisan serve to get a local development environment running without needing to touch apache.

Activity icon

Replied to How To Recover .git Directory?

If you still have the file changes, and the remote repo, just check the project out again and copy your new files over the old and you should see file differences.

Can you clarify what your mean when you say ‘I cant download it again’ - as in you can’t ‘git pull’?

Aug
26
1 year ago
Activity icon

Replied to Recommend Me A Laravel E-commerce Package

The same question was asked last week - https://laracasts.com/discuss/channels/laravel/ecommerce-from-scratch

Assess why you want ecommerce first. If the motivation is to sell products as soon as possible, building an ecommerce solution (and maintaining it) in laravel isn’t the quickest way.

Start with something off the shelf (like shopify) and build up when you’ve got some commercial reason to do so.

Aug
24
1 year ago
Activity icon

Replied to Show Relation Field On Resource Index

If you have a relationship in User called roles(), then in your index blade, you just need to do the following:

@foreach($users as $user)
{{ $user->roles }}
@endforeach 

You’ll probably want to foreach through roles too to get $role->name

Activity icon

Replied to Gitlab

You shouldn’t need to manually upload any files to a new repo. If you have created a new repo locally, by initially running ‘git init’ in your directory and then adding and committing, you should then set a remote

git remote add <remote-name> <url>

Using the path provided by gitlab.

Alternatively clone the remote directory into a new folder locally which will automatically set the remote for you.

Aug
22
1 year ago
Activity icon

Replied to Laravel Learinig

Watch Jeff’s excellent introduction series to Laravel 5.4 https://laracasts.com/series/laravel-from-scratch-2017

Aug
21
1 year ago
Activity icon

Replied to Get Selected Value From Select On Change In Laravel

if you are trying to display the value of the selected option further down the page you don’t need to use Ajax to do this as you can just get the option value using onChange and then set the value via $(‘#foo’).val(optionValue); where #foo is the element containing your php variable.

I’d suspect this is part of a bigger form which will be submitted to the server to store the value of your selected option which it will get from your element.

My advice would be to work out your form logic first and then add your jquery as an enhancement to the view otherwise you’ll get caught up in the detail before core functionality is in place.

If you can post some more code including the contents of your blade file and related controller method this will give more context.

Aug
20
1 year ago
Aug
19
1 year ago
Activity icon

Replied to File_put_contents(...): Failed To Open Stream: No Such File Or Directory - Always This Problem

Your storage folder and all inside should have 755 file permissions. Make sure you add the the -R flag to recursively set inside folders.

Activity icon

Replied to How To Change Default Webpack.mix Path?

Are you running npm on your host machine or inside your vm?

Aug
18
1 year ago
Activity icon

Replied to ECommerce From Scratch?

I’d never recommend building ecommerce from scratch. If you really are starting from a clean slate, work out how many products you are planning on selling and build a solution around that. If you are in a hurry to start trading, an off the shelf pay as you go like shopify.com would be my recommendation. You can be up and running in a day and that will buy you some time to establish what you need. If you build custom, you are exposing yourself to a great deal of anguish regarding payment gateway integration, hacking and the like. Unless you have a specific need and are expert at building ecommerce then mitigate your risk by using someone else’s work.

Activity icon

Replied to Statamic Vs. Laravel Nova

A 3rd contender which acts as CRUD and both CMS is a product called backpack. https://backpackforlaravel.com Pretty straight forward to set up with no additional models required, Deals with user management and permissions too (using Spatie package for permissions)

Activity icon

Replied to Best Way To Bisect Two Large Collections

If you are only trying to show the items which are not new items, in which case don’t you just need a single query where prepared =1?

If you are trying to exclude the new items from all items, then you can add a whereNotIn with an array of the ids you wish to exclude.

Aug
13
1 year ago
Activity icon

Replied to Join Three Table And Get Specific Data

@armancs you'd be better create the table with a migration file to make it easier to deploy your application.

I'm not sure how your question has changed but i can see the addition of

$countries->country->name

which won't get you anything as there isn't a relationship to country on your $country model.

If you can look at your question again and clarify then i'll have another go at answering,

Activity icon

Replied to Join Three Table And Get Specific Data

If you use standard Laravel table and field names you’ll have a much easier time getting this to work.

Firstly, your tables don’t need the _tbl suffix - they are already tables in a db.

Your tables can just be ‘countries’ and ‘ universities’

See https://github.com/alexeymezenin/laravel-best-practices/blob/master/README.md#follow-laravel-naming-conventions

Secondly, your ref_country_id should be just country_id. This way you don’t need to define the $fk. Also given you’ve already got region_id in that table, the region_id is also a foreign key so a variable named $fk isn’t the only one.

In your view, if you’ve got a single university you should be able to display the country as such

$country = $university->country->name;

Also, to follow convention, you don’t need to suffix Model onto the end of your model names. Follow conventions, and it’ll make all your dev easier (and much easier for others to debug).

Aug
12
1 year ago
Activity icon

Replied to Customising Users Table

Where are you storing your state_id and referencing your States data from?

Aug
11
1 year ago
Activity icon

Replied to Customising Users Table

@flowser first you need to ensure your model relationships correctly reflect what you are trying to achieve. You’ll waste a lot of time and brain working up your controller methods before you have done this mapping,

Let’s us see your User model and migrations and someone can help you with those.

Activity icon

Replied to Form Submission

@10minutemail what does your store method look like? Also check your route for store isn’t clashing with your route for index. You can do this by running artisan route:list

Activity icon

Replied to Body Exceeds With Aside Tag

@joffpascual can you add some code formatting into your post above as it’s hard to see what’s going on in your blade.

Aug
10
1 year ago
Activity icon

Replied to Customising Users Table

As @aurawindsurfing suggested, you need to extend your user model to add state_id and then set up as hasOne relationship with a new model called State. You’ll need to create a migration to do this, if you system is already in product or add the field to the User migration if its not. Should then be straight forward to receive the State name for the id.

Activity icon

Replied to Where Are You All From?

Just up the road from you in Bristol

Aug
08
1 year ago
Activity icon

Replied to How To Get Last Id In Laravel?

@Snapey I admire your persistence.