Sergiu17

Sergiu17

Web Developer at DevelopmentAid

Member Since 3 Years Ago

Chisinau

Experience Points
415,380
Total
Experience

0 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
1715
Lessons
Completed
Best Reply Awards
380
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 50
415,380 XP
Oct
27
5 hours ago
Activity icon

Replied to Getting "failed To Open Stream: Unknown Error 4094" Error

Permissions issues I guess, try this

sudo chmod -R 775 storage
Oct
23
4 days ago
Activity icon

Replied to Laracasts.test/api/stats Not Found

laracasts.test is an alias for Jeffrey, it is localhost:8000

Activity icon

Replied to Error Call To Undefined Method Symfony\Component\HttpFoundation\ParameterBag::input()

Why are you trying to iterate over $requests? You can't do this.

What are you trying to achieve?

Oct
22
5 days ago
Activity icon

Replied to <div> Margin Taking Up All Available Width

@james_moore upload the image on imgur.com and paste the link on the img here

Oct
21
6 days ago
Activity icon

Replied to Create New Main Git Branch In PHP Storm

Hi,

git checkout -b pre-develop
git push

edit*, pre-develop

Oct
19
1 week ago
Activity icon

Awarded Best Reply on Value Not Passed As Prop?

edit*

@elenktik Sorry, I just tested, looks like it should be kebab-case format disabled-message="Here is a message lol..."

Activity icon

Replied to Value Not Passed As Prop?

edit*

@elenktik Sorry, I just tested, looks like it should be kebab-case format disabled-message="Here is a message lol..."

Oct
17
1 week ago
Activity icon

Replied to Laravel Update() Function Not Working

public function updateSavings(Request $request) {
	dd($request->all());
}

everything shows up here? amount, method and so on? you may have validation errors, and you are redirected back

Activity icon

Replied to Laravel Update() Function Not Working

what does not working mean?

Oct
15
1 week ago
Activity icon

Replied to Seeder - Class XYSeed Does Not Exist

add namespace to your class

<?php

namespace Database\Seeders;
Activity icon

Replied to Class Parameters Not Taken When Invoked

class MyClass {

	public function __construct($x, $y) {
		$this->x = $x
		$this->y = $y
	}

	public function __invoke()
	{
		// code
	}
}
Activity icon

Awarded Best Reply on Exists Rule Validation On Array

After I did my super investigations)) ( hope I'm right ), looks like one by one

// CategoryRequest.php

public function rules(): array {
	DB::connection()->enableQueryLog();

	return [
		'categories' => 'required|array',
		'categories.*' => 'required|exists:' . Category::class . ',id',
	];
}
// Controller
public function store(CategoryRequest $request) {
	dd(DB::getQueryLog());
}

if I send 3 ids - https://i.imgur.com/ujYF9OO.png - I get 3 queries from DB::getQueryLog()

if i send 1 id - https://i.imgur.com/zGtYO4N.png - I get just one query

Activity icon

Replied to Exists Rule Validation On Array

After I did my super investigations)) ( hope I'm right ), looks like one by one

// CategoryRequest.php

public function rules(): array {
	DB::connection()->enableQueryLog();

	return [
		'categories' => 'required|array',
		'categories.*' => 'required|exists:' . Category::class . ',id',
	];
}
// Controller
public function store(CategoryRequest $request) {
	dd(DB::getQueryLog());
}

if I send 3 ids - https://i.imgur.com/ujYF9OO.png - I get 3 queries from DB::getQueryLog()

if i send 1 id - https://i.imgur.com/zGtYO4N.png - I get just one query

Activity icon

Awarded Best Reply on 404 On Form Post With Laravel Collective

If you use laravel 8, then

use App\Http\Controllers\MessagesController;

Route::post('/contact/submit', [MessagesController::class, 'submit']);

you need to specify full path of the class

Activity icon

Replied to 404 On Form Post With Laravel Collective

If you use laravel 8, then

use App\Http\Controllers\MessagesController;

Route::post('/contact/submit', [MessagesController::class, 'submit']);

you need to specify full path of the class

Activity icon

Replied to 404 On Form Post With Laravel Collective

@tikay did you try to clear routes cache? php artisan route:clear

in Network tab, when you submit your form, is the URL correct?

Oct
14
1 week ago
Activity icon

Replied to 404 On Form Post With Laravel Collective

{{ Form::open(['url' => 'contact/submit', 'method' => 'post']) }}

You need a post request, right? add method attribute to the form

Activity icon

Awarded Best Reply on Is It Possible To Upgrade Laravel From 5.8 To 7.X?

Hi, yes, take small steps, and read upgrade guides on laravel website

from 5.8 to 6 - https://laravel.com/docs/6.x/upgrade

from 6 to 7 - https://laravel.com/docs/7.x/upgrade

Activity icon

Replied to Is It Possible To Upgrade Laravel From 5.8 To 7.X?

Hi, yes, take small steps, and read upgrade guides on laravel website

from 5.8 to 6 - https://laravel.com/docs/6.x/upgrade

from 6 to 7 - https://laravel.com/docs/7.x/upgrade

Oct
13
2 weeks ago
Activity icon

Replied to Install Dependency On Composer

https://stackoverflow.com/questions/23771117/requires-ext-fileinfo-how-do-i-add-that-into-my-composer-json-file

To enable extensions, verify that they are enabled in your .ini files: - C:\MAMP\bin\php\php7.3.7\php.ini

You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

Oct
12
2 weeks ago
Activity icon

Awarded Best Reply on How To Make IF Conditional Logged User Roles In Blade Laravel?

@if(auth()->user()->role_id == 2 || auth()->user()->role_id == 7)
	<p>RED</p>
@endif

@if(auth()->user()->role_id == 2 || auth()->user()->role_id == 8)
	<p>BLUE</p>
@endif
Activity icon

Replied to How To Make IF Conditional Logged User Roles In Blade Laravel?

@if(auth()->user()->role_id == 2 || auth()->user()->role_id == 7)
	<p>RED</p>
@endif

@if(auth()->user()->role_id == 2 || auth()->user()->role_id == 8)
	<p>BLUE</p>
@endif
Oct
11
2 weeks ago
Activity icon

Awarded Best Reply on How To Disable Button Based On Value In Table?

@balamurugan08 you can use get() too, but in your case first() simplifies' the work

// get example
$expired = DB::table('addvouchers')
	->select('addvouchers.expired')
	->where('id', $id)
	->get();

$expired // this is a collection, that's why you is better to use first()
// and because you are searching for ID, first() method fits better
// IDs are unique in your database, it will return a single object anyway

// in the view you have to do
@if($expired->first()->expired == '1') // call first() here
	// something
@else
	// something else
@endif

this example works too

Activity icon

Replied to How To Disable Button Based On Value In Table?

@balamurugan08 you can use get() too, but in your case first() simplifies' the work

// get example
$expired = DB::table('addvouchers')
	->select('addvouchers.expired')
	->where('id', $id)
	->get();

$expired // this is a collection, that's why you is better to use first()
// and because you are searching for ID, first() method fits better
// IDs are unique in your database, it will return a single object anyway

// in the view you have to do
@if($expired->first()->expired == '1') // call first() here
	// something
@else
	// something else
@endif

this example works too

Activity icon

Replied to How To Disable Button Based On Value In Table?

Use first() instead of get()

$expired = DB::table('addvouchers')->select('addvouchers.expired')->where('id', $id)->first();
@if($expired->expired == '1')
	// something
@else
	// something else
@endif
Oct
10
2 weeks ago
Activity icon

Awarded Best Reply on Cookie Length Should Be Less Than Or Equal To 4096 Characters.

You shouldn't store products in your 'Cookies', because it has limited memory, story only the ID of the product

Oct
09
2 weeks ago
Activity icon

Replied to Uncaught SyntaxError: Import Declarations May Only Appear At Top Level Of A Module

could be node server, python, php, ruby, whatever

npm install http-server -g
http-server

// or

python3 -m http.server

// or

php -S localhost:8000

But if you compile your files, you will just open index.html, and everything will work without server, and this is what you actually need.

Activity icon

Replied to Uncaught SyntaxError: Import Declarations May Only Appear At Top Level Of A Module

start a simple local server, or compile your scripts with a tool like gulp or webpack

Activity icon

Replied to Uncaught SyntaxError: Import Declarations May Only Appear At Top Level Of A Module

<script type="module" src="./app.js" ></script>

try to add type="module"

Activity icon

Awarded Best Reply on I Need Some Clarification Regarding The Laracasts Plan

It's monthly plan, if you subscribe today, next month on the same date, they will take another 15$ unless you cancel your subscription.

It includes everything, every course on the site, Vue, JavaScript, PHP, Laravel, all of them.

Oct
08
2 weeks ago
Activity icon

Replied to Test APi Token With Permissions Problem

@gianmarx and if you try to set header as a third parameter of put method, still doesn't work?

$this->put('/api/update', $dataUpdate, [
	'Accept' => 'application/json',
	'Authorization' => 'Bearer '.tokenB,
])
->assertStatus(200);
Activity icon

Replied to Test APi Token With Permissions Problem

Try to clear the headers before you send update request

$response = $this->withHeaders( ...

$this->flushHeaders(); // this line

$response = $this->withHeaders([
            'Accept' => 'application/json',
            'Authorization' => 'Bearer '.tokenB,
        ])->put('/api/update',$dataUpdate);
        $respone->assertStatus(200);
Activity icon

Replied to I Need Some Clarification Regarding The Laracasts Plan

It's monthly plan, if you subscribe today, next month on the same date, they will take another 15$ unless you cancel your subscription.

It includes everything, every course on the site, Vue, JavaScript, PHP, Laravel, all of them.

Activity icon

Replied to Gmail Issue

Most of the time it's related to Less secure apps and Two step authentication

check this - https://stackoverflow.com/questions/42558903/expected-response-code-250-but-got-code-535-with-message-535-5-7-8-username

Activity icon

Awarded Best Reply on Test API Sanctum POST It Does Not Take The Data

'Content-Type' => 'application/json', - you have to use postJson instead of post

->postJson('/api/store', $data);

or remove 'Content-Type' => 'application/json',

Activity icon

Replied to Test API Sanctum POST It Does Not Take The Data

'Content-Type' => 'application/json', - you have to use postJson instead of post

->postJson('/api/store', $data);

or remove 'Content-Type' => 'application/json',

Activity icon

Replied to I Was Try To Install Laravel Passport I Get This Error.

@sakthivel what are the errors exactly? you may need to install some extensions

Activity icon

Replied to Target Class [Api\ApiController] Does Not Exist

use App\Http\Controllers\Api\ApiController;

Route::verb('/end-point', ApiController::class . '@method');
// or
Route::verb('/end-point', [ApiController::class, 'method']);
Activity icon

Replied to I Was Try To Install Laravel Passport I Get This Error.

try with

composer clearcache

then try again

Activity icon

Replied to Can't Download The Video

Looks like you've downloaded too many already

Oct
06
3 weeks ago
Activity icon

Awarded Best Reply on BadMethodCallException Call To Undefined Method App\BookingService::bookevents()

It's not about the routes, it's inside controllers I guess you have something like

$bookservice->bookevents()
// or
BookingService::bookevents() 

and you don't have such a method in your Model.

The error tells you exactly: Call to undefined method App\BookingService::bookevents()

method - bookevents

class - BookingService.php (Model)

Activity icon

Replied to BadMethodCallException Call To Undefined Method App\BookingService::bookevents()

It's not about the routes, it's inside controllers I guess you have something like

$bookservice->bookevents()
// or
BookingService::bookevents() 

and you don't have such a method in your Model.

The error tells you exactly: Call to undefined method App\BookingService::bookevents()

method - bookevents

class - BookingService.php (Model)