lara-dom

lara-dom

Member Since 1 Month Ago

Experience Points
460
Total
Experience

4,540 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
0
Lessons
Completed
Best Reply Awards
0
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 1
460 XP
Sep
17
2 days ago
Activity icon

Replied to Blade View For Rich Text Field On Description Tag

woow it;s working!!!

Thanks! i was going nuts for a day with just a simple little twik! spectacular!!!

Activity icon

Replied to Blade View For Rich Text Field On Description Tag

I have this <meta property="og:description" content="{!! $item->description !!}">

The descripotion field is a rich text from voyager

And I have this in the html source <meta property="og:description" content="<p>Ce livre a tout pour satisfaire leur curiosité sur des fascinantes créatures disparues: du brachiosaure au tyrannosaure, en passant par le petit vélociraptor et l'archéoptéryx.</p><p>On y trouve des informations étonnantes, des devinettes et de magnifiques illustrations en couleurs.</p>">

Thanks!

Activity icon

Replied to Blade View For Rich Text Field On Description Tag

That's exactly what i am using.

I can't get rid of the p tag from the description field. using @section('description', {!! $item->description !!} ) create an syntax error, unexpected '<', expecting ')' (View

When using it keeps the P tag in the description when sharing.

I try html_entity_decode and htmlspecialchars_decode but still got all the html tag outputting in the html tag.

Really im confuse

Sep
16
3 days ago
Activity icon

Started a new Conversation Blade View For Rich Text Field On Description Tag

I'm using voyager in a laravel 7 shopping app for the description of all products.

I want to output the field for the description of the product

@section('description', {!! $item->description !!} )

and

for the facebook share <meta property="og:description" content="{!! $item->description !!}">

When I use {!! $item->description !!} in the body, no problem. But in the tag the output always read the p tag and all style form the description.

The weird thing is it's working find on localhost but not on the server. I tried various combination of solution with the same result. I feel there's a quick or maybe it's just not possible?

Thanks for any help I can get

Aug
23
3 weeks ago
Activity icon

Replied to Laravel 7 Timestamp Migration Always Return 0000-00-00 00:00:00 When Importing A Csv Excel File

well everything is complex.

I will just forget about this sitemap thing.

Is it possible it's because my product model is not fillable?

I will try this one https://github.com/bfinlay/laravel-excel-seeder

maatewebsite seem dizzling from my 4 months laravel exeperience

Activity icon

Replied to Laravel 7 Timestamp Migration Always Return 0000-00-00 00:00:00 When Importing A Csv Excel File

I tried version 1 of Flynsarmy/laravel-csv-seeder, i am running php 7.4 on my local host but 72 on the server.

Anyways i got the same error on localhost

I will try other packgae to see but it must exist a simple ways to properly import this csv to the database?

This solution seem good but its getting into a deeper rabbit hole

Thanks

Activity icon

Replied to Laravel 7 Timestamp Migration Always Return 0000-00-00 00:00:00 When Importing A Csv Excel File

I did put this in the up function and i have this after trying a bit of everything

Call to undefined method Illuminate\Database\Seeder::run()

at W:\1A-SERVER\foire-cart-ecom\database\seeds\ProductsCsvSeeder.php:24 20| // DB::table($this->table); 21| 22| DB::table($this->table)->truncate(); 23|

24| parent::run(); 25| } 26| }

Activity icon

Replied to Laravel 7 Timestamp Migration Always Return 0000-00-00 00:00:00 When Importing A Csv Excel File

oooh and my pivot table

   public function up()
    {
        Schema::create('order_product', function (Blueprint $table) {
            $table->id();



            $table->unsignedBigInteger('order_id')->unsigned()->nullable();
            $table->foreign('order_id')->references('id')
                  ->on('orders')->onUpdate('cascade')->onDelete('set null')->constrained();

            $table->unsignedBigInteger('product_id')->unsigned()->nullable();
            $table->foreign('product_id')->references('id')
                ->on('products')->onUpdate('cascade')->onDelete('set null')->constrained();

            $table->integer('quantity')->unsigned();

            
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_product');
    }

and my products table if this can help


    public function up()
    {
        Schema::create('products', function (Blueprint $table) {

            $table->id();
            $table->string('title');
            $table->string('slug')->unique();
            $table->string('category');
            $table->string('liquidation')->nullable();
            $table->string('english')->nullable();
            $table->integer('quantity');
            $table->integer('regular')->nullable();
            $table->integer('priceNOtx');
            $table->integer('tps');
            $table->integer('tvq')->nullable();
            $table->integer('price');
            $table->string('editeur')->nullable();
            $table->string('auteur')->nullable();
            $table->string('dimension')->nullable();
            $table->longText('short_description')->nullable();
            $table->string('imagethumb');
            $table->string('imagepath');
            $table->string('imagethumb2')->nullable();
            $table->string('imagepath2')->nullable();
            $table->string('imagethumb3')->nullable();
            $table->string('imagepath3')->nullable();
            $table->string('imagethumb4')->nullable();
            $table->string('imagepath4')->nullable();
            $table->string('video_path')->nullable();
            $table->longText('description')->nullable();
            $table->timestamps();
        });
    }

   
    public function down()
    {



        Schema::dropIfExists('products');
      
    }

Activity icon

Replied to Laravel 7 Timestamp Migration Always Return 0000-00-00 00:00:00 When Importing A Csv Excel File

woow nothing is easy! Im still a rookie and I lack some basic logic with this.

I have some conflict with a pivot table I have. I have a relationship between products and users when buying so

I have this for the seeder

use Illuminate\Database\Seeder;
use Flynsarmy\CsvSeeder\CsvSeeder;

class ProductsCsvSeeder extends Seeder
{
    public function __construct()
	{
		$this->table = 'products';
		$this->filename = base_path().'/database/DATABASE-21-aout.csv';
	}

	public function run()
	{
		// Recommended when importing larger CSVs
		DB::disableQueryLog();

		// Uncomment the below to wipe the table clean before populating
		DB::table($this->table)->truncate();

		parent::run();
	}
}

SQLSTATE[42000]: Syntax error or access violation: 1701 Cannot truncate a table referenced in a foreign key constraint (foire_mobile.order_product, CONSTRAINT order_product_product_id_foreign FOREIGN KEY (product_id) REFERENCES foire_mobile.products (id)) (SQL: truncate table products)

This looks promising but not easy to implement for a rookie brain!

Thanks

Activity icon

Started a new Conversation Laravel 7 Timestamp Migration Always Return 0000-00-00 00:00:00 When Importing A Csv Excel File

I search all the related article but no solution. I was setting up a sitemap for laravel when I realise the timestamp is not ok. So this is bad for seo.

I always have those 0 in the created_at and updated_at field in my sql database.

I'm not sure if it's a laravel, sql or excel question.

What I do:

  • migrate my table in laravel in my localhost $table->timestamps(); tried this also but no
            $table->timestamp('created_at')->useCurrent();
            $table->timestamp('updated_at')->useCurrent();
            $timestamps = false;
            $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
  • I import the sql database in the server phpmyadmin from my localhost

  • And import the excel csv file in phpmyadmin with the data but with nothing.

Maybe there's another ways to properly do this?

Thnaks for any help somebody can give me.

Aug
19
1 month ago
Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

It's a fix, a good rookie mistake,

I made around 15 little websites without laravel and i always put it in my home folder on the server but with a laravel website it was creating a problem.

I went back to basic and try to put my lrl public folder in the public_html like most of the tutorial online so my error handling was working. After 3 days opf mind crunching its finally good

Aug
18
1 month ago
Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

well it's not it. Everywhere when a error validation is needed it always redirect to homepage instead of flashing the error. And everything go through when it's successfull. I wa able to register, logout login add to cart edit cart checkout with a stripe success. I don't think a user will manage to do all that without a error :)

I did a fresh laravel installation with softaculous and the error handling with ok so it's definitely a cpanel thing

thank you guys for the help

Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

yes i have a loot of session in /storage/framework/sessions/

but something strike me reading your website

I have my installation in my main domain folder.

woow i hope the posting here is erasable before it's not the type of backlinks i am looking for :)

Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

ok good got the link page needed a reload, but it's basic stuff

thanks

Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

Ohh yes my env is ok, everything is working from adding to cart to checking out with stripe.

Only the error redirecting.

Check on and clicking on register by entering nothing it should redirect back with a flash message saying to the user the error. It's working great on my local server (xampp) but for some weird advance reason nope.

I know it's something very little from the cpanel. Anyways I should have some feedback from the host company very soon.

YEs the laravel docs are great. But nothing about the shared hosting deployment if you are talking about this link

Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

well i zip it and extract it to the approppriate place and import the sql db from my localhost. I do my migration in my localhost. I don't know any other ways to do it. I know theres a way with the ssh from within.

But everything is doing fine when live except when posting an error its redirecting to the homepage. I manage to do a complete shopping cart with little knowledge of php and overall programming skill. 5 months ago i was just doing simple html, css and very little js.

I search for an advanced tutorial course on cpanel without any success.

Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

that would be awesome because i still don't have any support from my hosting company, i really am stuck

cPanel Version 88.0 (build 13)

thanks

Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

yeah, but i need to know how cpanel works to make it all these by default

still got some learning to do, like always. A constant mind grinder

thanks

Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

I have that in storage/framework/views/


<?php if(count($errors) > 0): ?>
<div class="alert alert-danger">
    <ul>
        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <li><?php echo $error; ?></li>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </ul>
</div>
<?php endif; ?>




   <div class="card-body">
                    <form method="POST" action="<?php echo e(route('register')); ?>">
                        <?php echo csrf_field(); ?>

                        <div class="form-group row">
                            <label for="name" class="col-md-4 col-form-label text-md-right"><?php echo e(__('Name')); ?></label>

                            <div class="col-md-6">
                                <input id="name" type="text" class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="name" value="<?php echo e(old('name')); ?>" autocomplete="name" autofocus>

                                <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($message); ?></strong>
                                    </span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label for="email" class="col-md-4 col-form-label text-md-right"><?php echo e(__('E-Mail Address')); ?></label>

                            <div class="col-md-6">
                                <input id="email" type="email" class="form-control <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="email" value="<?php echo e(old('email')); ?>" autocomplete="email">

                                <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($message); ?></strong>
                                    </span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label for="password" class="col-md-4 col-form-label text-md-right"><?php echo e(__('Password')); ?></label>

                            <div class="col-md-6">
                                <input id="password" type="password" class="form-control <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="password" autocomplete="new-password">

                                <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($message); ?></strong>
                                    </span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label for="password-confirm" class="col-md-4 col-form-label text-md-right"><?php echo e(__('Confirm Password')); ?></label>

                            <div class="col-md-6">
                                <input id="password-confirm" type="password" class="form-control" name="password_confirmation" autocomplete="new-password">
                            </div>
                        </div>

                        <div class="form-group row mb-0">
                            <div class="col-md-6 offset-md-4">
                                <button type="submit" class="btn btn-primary">
                                    <?php echo e(__('Register')); ?>

                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/jnewvisi/ADDON/foiremobile.com/fresh/resources/views/auth/register.blade.php ENDPATH**/ ?>

Activity icon

Replied to Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

the laravel.log in /storage/logs/ was full, i erase it and recreate the register, still redirecting to homepage but no new logging appear.

Im still a rookie, so it must be a cpanel thing where some extension are needed. I will try an install through the softwareculous thing.

How can i know which extension are needed and where can I install them in cpanel Thanks

Activity icon

Started a new Conversation Fresh Laravel 7 Don't Show Errors And Redirect To Homepage

0

Something confusing is happening, maybe I did a rookie mistake?

When submitting the form it redirect to homepage if an error occur. You can visit the following link and just click on submit. Thats a fresh laravel 7 installation. I just took out the input required and added that

@if (session()->has('success'))
<div class="alert alert-success">
    {{ session()->get('success') }}
</div>
@endif


@if (session('status'))
<div class="alert alert-success" role="alert">
    {{ session('status') }}
</div>
@endif



@if(count($errors) > 0)
<div class="alert alert-danger">
    <ul>
        @foreach ($errors->all() as $error)
            <li>{!! $error !!}</li>
        @endforeach
    </ul>
</div>
@endif



I have the installation in a cpanel addon subdomain, Is that what cause the problem?

Everything is fine on my localhost.

It must be a cpanel thing

I really need a little hint from an expert

Thanks

Aug
16
1 month ago
Activity icon

Replied to Laravel 7 On Submit Always Redirecting On Homepage

actually this redirect is working but when editing the profile it always redirect to homepage.

my UsersController


$user = auth()->user();

            $request->validate([
                'email' => 'required|email',
                'name' => 'required',
                'last_name' => 'required', 
                'address' => 'required', 
                'city' => 'required',
                'province' => 'required',
                'postalcode' => 'required', 
            ]);

            $user->email = $request->email;
            $user->name = $request->name;
            $user->last_name = $request->last_name;
            $user->address = $request->address;
            $user->province = $request->province;
            $user->city = $request->city;
            $user->postalcode = $request->postalcode;
            $user->phone = $request->phone;
            $user->save();

            return redirect()->back()->with('success', 'Votre profile est modifier avec succès!');

and on my blade view i have for the errors

  @if ($errors->any())
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif

and for the input

@error('email')
                            <div class="profile-danger">
                                <span>{{ $message }}</span>
                            </div>
                        @enderror

but it's redirect to with errors so

Activity icon

Started a new Conversation Laravel 7 On Submit Always Redirecting On Homepage

Viewed 10 times

0

Really weird reaction when my app is online. MAybe because it's on a subdomain temp.mydomainname.com for testing before going live.

When login, posting and updating everything works fine on my localhost (xampp) but when online in my cpanel subdomain shared setup, every time I submit a form with an error or not it always redirecting to the homepage. I can redirect a flash message with it but i can't redirect back through a controller.

I try to find out and pin point from where it can be from, but I'm really confuse??

Maybe somebody already had the same issue and know a quick fix.

Thanks

I decide to give my live url so you can see the problem. I would like to give some code but I can't see from where.

Everything is working fine on my localhost... really puzzling!

Thanks for any suppoort you can provide