Member Since 6 Months Ago
3,450 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
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.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Earned once your experience points ranks in the top 10 of all Laracasts users.
Replied to Delete File Inside Public Folder.
Actually found the answer
File::delete(public_path($zipFileName));
Started a new Conversation Delete File Inside Public Folder.
I want to delete a zip file lets say "abc.zip" which is inside public folder.
I am trying somethng
Storage::delete(public_path("abc.zip"));
but its not working.
Started a new Conversation How To Handle "405 Method Not Allowed" Error In Laravel 8?
I have set my debug mode "OFF"
I have "http://127.0.0.1:8000/login" which is post
Route::post('/login' .......
when someones try to access http://127.0.0.1:8000/login by get method. I get error
Oops! An Error Occurred
The server returned a "405 Method Not Allowed".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
I want to redirect to 404 page or want to throw 1 line custom error for any 405 . How do i do it??
Replied to Set A Foreign Key To Nullable In Laravel 8
@s4muel this worked great for me.
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('signs', function (Blueprint $table) {
$table->unsignedBigInteger('po_id')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('signs', function (Blueprint $table) {
$table->unsignedBigInteger('po_id')->nullable(false)->change();
});
}
Replied to Set A Foreign Key To Nullable In Laravel 8
@jlrdw How do you attach the image here loll sorry i am new here.
But i have to follow this due to weird client requirement.
lets say my signs table has two foreign ids project_id & po_id.
Think signs as a products. projects can have many signs/products. Instead of i suggest to have coupons client wants to add another sign which will have negative value and that will act as a coupon. so this wont have any po_id relation. Its weird. Our company also did not recommend this solution but they said thats how they are maintaining their sheet till date. and they want to follow this way.
Replied to Set A Foreign Key To Nullable In Laravel 8
Thanks for the quick reply. Yes i am using migration. what about the down() ?
would that be? :
$table->unsignedBigInteger('po_id')->nullable(false)->change();
Started a new Conversation Set A Foreign Key To Nullable In Laravel 8
I have 'signs' table in that, I have unsigned 'po_id' as a foreign key which is not nullable at the moment.
How to I make it nullable. Do i have to compulsory drop the column first?