Sinnbeck

Sinnbeck

Programmer at Aalund

Member Since 4 Years Ago

Odder

Experience Points
243,360
Total
Experience

1,640 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
136
Lessons
Completed
Best Reply Awards
369
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 49
243,360 XP
Dec
14
21 hours ago
Activity icon

Awarded Best Reply on Fill

As it has to do with eloquent, you can ctrl+f on that page :)

https://laravel.com/docs/6.x/eloquent#mass-assignment

Activity icon

Awarded Best Reply on How To Loop Two V-for Loop In The Same <tr> ?

You can use a template tag to loop without rendering anything

https://vuejs.org/v2/guide/list.html#v-for-on-a-lt-template-gt

If you mean that you need the same index of the second array you can probably do this

<tr v-for="(item, index) in array1">
<td>{{item}}</td>
<td>{{array2[index]}}</td>
Activity icon

Replied to How To Count Number Of Fields Of Table

Do you mean fields as in columns?

use Illuminate\Support\Facades\Schema;



 count(Schema::getColumnListing($table));
Activity icon

Replied to Laravel Theme Development Option By 3rd Party

Another solution I have seen in action is to simply have a ckeditor page for each part of the page. I worked for a company that did this. Then in each editor you would insert a variable which embedded that part into the page (a product card on a products page etc)

Activity icon

Replied to Laravel Theme Development Option By 3rd Party

Yes you would have to find a way to blacklist unwanted code like @php. Twig is built for this out of the box

Dec
13
1 day ago
Activity icon

Awarded Best Reply on Grouping Queries

Just curious. Why not just use one row for each? Not a lot of columns, and would make data lookups sooo much easier.

Anyways. You might want to consider using separate fields for date and time. Would make grouping so much easier.

Activity icon

Awarded Best Reply on PHPRedis Installation Or Issue With Facade

Remove this

use Illuminate\Redis\RedisManager;

You are creating an alias for \RedisManager not \Illuminate\Redis\RedisManager :) \Illuminate\Redis\RedisManager already exists

What they mean is that you should later on just do this (inside a controller of course)

use Illuminate\Support\Facades\Redis;


Route::get('redis', function(){
    Redis::set('name', Str::random(10));
    dd(Redis::get('name'));
});
Activity icon

Replied to Notifications Are Broken

Did you try force creating file cache using ctrl + shift + delete?

If that does not work, my best bet is that there is a post with some sort error in the url that causes the error

Activity icon

Awarded Best Reply on Accessing Envoy From Service Provider?

I have never tried running envoy from code (use it daily in CLI), but you could just try grabbing the code from vendor/bin/envoy and copy pasting to a service provider or similar (only the lines starting with $app)

Activity icon

Replied to Cannot SSH To My Server, After Deleting The SSH Firewall Rule...

If you feel like it spend 5 minutes writing how you fixed it and mark it as best answer. Others might end up with the same issue and come here looking for a solution

Activity icon

Replied to Cannot SSH To My Server, After Deleting The SSH Firewall Rule...

Did you contact support? I am sure they can connect to the server directly

Activity icon

Replied to How To Track Facebook Referere

From the documentation

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

Activity icon

Replied to I Cant Send An Email

Try smtp.gmail.com (and also give tls a try)

Activity icon

Replied to I Cant Send An Email

What error are you getting?

Activity icon

Replied to Pagination

Yes always sanitize your inputs. Users are evil (well some are)

Activity icon

Replied to Pagination

Great. Remember to mark your answer as best

Activity icon

Replied to Pagination

You can just pass the page manually if it does not work

->paginate(10, ['*'], 'page',$request->page);
Activity icon

Awarded Best Reply on I Need Your Help On This

So $urlcategorie is the css name?

$categories = Blog::latest('blog_Id')->where('urlcategorie' , $urlcategorie)->Paginate(6);
if (!$categories->count()) {
 abort(404);
}
Activity icon

Replied to I Need Your Help On This

So $urlcategorie is the css name?

$categories = Blog::latest('blog_Id')->where('urlcategorie' , $urlcategorie)->Paginate(6);
if (!$categories->count()) {
 abort(404);
}
Activity icon

Replied to No Message

Be sure that it is set to either All or XHR (for ajax requests) https://imgur.com/Jeeu8G4

Activity icon

Replied to How To Loop Two V-for Loop In The Same <tr> ?

You can use a template tag to loop without rendering anything

https://vuejs.org/v2/guide/list.html#v-for-on-a-lt-template-gt

If you mean that you need the same index of the second array you can probably do this

<tr v-for="(item, index) in array1">
<td>{{item}}</td>
<td>{{array2[index]}}</td>
Activity icon

Replied to Accessing Envoy From Service Provider?

I have never tried running envoy from code (use it daily in CLI), but you could just try grabbing the code from vendor/bin/envoy and copy pasting to a service provider or similar (only the lines starting with $app)

Activity icon

Replied to Grouping Queries

I dont see any "pretty" way of doing this "eloquently". That is why I suggestion just having one row for each.

Something like this

staff_id, sign_in_time, sign_out_time, sign_in_status, sign_out_status, date (without time)
Activity icon

Replied to Inbox Functionality From User To User

I see. No worries. Be sure that your data is valid before using it. Just as my example. You can easily check and assign in one line

'participants': [{
                    'id': window.participant && window.participant.id,
                    'type': window.participant && window.participant.type
                }]
Activity icon

Replied to Inbox Functionality From User To User

Really? It should not be able to reach that code.. Try making it more explicit

isParticipant(id) => {
if (window.conversations && window.conversations.length)
      return window.conversations.indexOf(id) !== -1;
}
return false;
    },
Activity icon

Replied to Grouping Queries

Well let us say you had just a date column.

select a1.staff_id, a1.date_signed, a1.status, a2.status ..etc
from attendance as a1
left join attendance as a2 on a1.staff_id = a2.staff_id and a1.date_signed = a2.date_signed and a2.status = 1
where a1.status = 0
Activity icon

Replied to PHPRedis Installation Or Issue With Facade

No need to delete this.

'Redis' => Illuminate\Support\Facades\Redis::class,

Just makes it easy to refer to the facade using Redis:: anywhere

So just leave the aliases as is. Maybe 1 year down the line you need, it and have forgotten that you removed it :)

Activity icon

Replied to Inbox Functionality From User To User

Most likely conversations isnt set when testing

return window.conversations && window.conversations.indexOf(id) !== -1;
Activity icon

Replied to No Message

Check if it is actually sent. Open the page in chrome and open developer tools (f12). Select the network tab. Now submit the form. You should see the request in the list. Select it and select the Headers tab. Now scroll all the way to the bottom. Do you see the _token here?

Activity icon

Replied to Pagination

Is that a post or get route? And are you sure page is set? Check $request->input('page');

Activity icon

Replied to Grouping Queries

Just curious. Why not just use one row for each? Not a lot of columns, and would make data lookups sooo much easier.

Anyways. You might want to consider using separate fields for date and time. Would make grouping so much easier.

Activity icon

Replied to PHPRedis Installation Or Issue With Facade

Remove this

use Illuminate\Redis\RedisManager;

You are creating an alias for \RedisManager not \Illuminate\Redis\RedisManager :) \Illuminate\Redis\RedisManager already exists

What they mean is that you should later on just do this (inside a controller of course)

use Illuminate\Support\Facades\Redis;


Route::get('redis', function(){
    Redis::set('name', Str::random(10));
    dd(Redis::get('name'));
});
Activity icon

Replied to Grouping Queries

You can most likely join the table with itself. Can you exaplain what these columns are and how they will be grouped? Like a group is staff_id + date_signed? (i assume a staff member can never have more than 2 rows for a date)

Activity icon

Replied to No Message

Ok so the form isnt actually submitted using html, but rather js. It sound like it isnt getting your csrf token. I assume it works if you use get instead?

Activity icon

Awarded Best Reply on I Want To Return My Link To Show With The Post->id

Oh sorry didnt notice the blade syntax

return redirect ('/prv/' . $prv->id)->with('status', 'Successful');
Activity icon

Replied to I Want To Return My Link To Show With The Post->id

Oh sorry didnt notice the blade syntax

return redirect ('/prv/' . $prv->id)->with('status', 'Successful');
Activity icon

Replied to Pagination

Show some code then please. :)

Activity icon

Replied to No Message

Refresh your page and try submitting the form again

Activity icon

Replied to I Want To Return My Link To Show With The Post->id

Ok I think you are missing a key component of how laravel works

  • Redirect - Sends the user to a new url, NOT a view..
  • View - Is the returned html of the current controller which is called by the current url.

See my previous answer on how redirect to a new url which then can show the view :)

Activity icon

Replied to I Want To Return My Link To Show With The Post->id

Are you actually trying to load a file called /prv/2.blade.php ?

Activity icon

Replied to No Message

There you go

method ="post" <- Uses post

Route::get('/checkout', <-- uses get

Either change the route to Route::post or the method of the form to method="get"

Activity icon

Replied to I Want To Return My Link To Show With The Post->id

If you want to redirect then use redirect

return redirect ('/prv/'{{$prv->id}})->with('status', 'Successful');
Activity icon

Replied to No Message

And how are you going to the url? Just entering http://mypage.com/checkout manually in the browser?

Activity icon

Replied to Pagination

Yes but you will then need to set the page number yourself like @sergiu17 said (unless it should just be page 1)

Activity icon

Replied to Class Seed.handler Does Not Exist

Please either mark a best answer or write how you fixed it yourself, and mark that as best answer