mercredi 23 septembre 2020

Summernote and Laravel add select on wysiwyg

wysiwyg editor

Is it possible to add select function in the wysiwyg editor? Instead of typing <select></select>in the code view.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2HqKoFf
via IFTTT

Add point datatype field in laravel 5.8 migration

I have to add point datatype for a postgres database field in laravel 5.8. I am using below code -

$table->point('coordinates')

It is adding geography datatype.

The same question has been put here as well.

How can I add point datatype.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32TtJCo
via IFTTT

Laravel DOMPDF failed to open stream: No such file or directory

I am using barryvdh/laravel-dompdf and trying to save a pdf file . it gives me a error

 file_put_contents(core/storage/app/pdf/pdffile50.pdf): failed to open stream: No such file or directory

File is not created

    $pdf = PDF::loadView('invoice::pdf_generate', $data)->setOptions(['dpi' => 115, 'defaultMediaType' 
    => 'media', 'defaultFont' => 'sans-serif', 'isRemoteEnabled' => true])
     ->save('core/storage/app/pdf/pdffile'.$invoice->id.'.pdf');

Does any one why am I getting this error?

This error occurs while task scheduling with a command php artisan recurring:invoice



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/33TdioX
via IFTTT

Timezone is not changing in laravel

I want to change timezone but it is not working

I have changed timezone in config/app.php

My previous timezone was 

'timezone' => 'Asia/Kolkata',

and i changed it to 

'timezone' => 'UTC',

But it is not working, please help me.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3mMsdKo
via IFTTT

mardi 22 septembre 2020

How rlease versions of laravel product?

We have laravel product. Now it has become huge product. Till now we were uploading our daily updates on live server. But Now we are going to release Beta Version and from now we want to upload on server with proper process. I mean we should have record of version of product and other documentation process.

Is there anything which laravel can provide us for this purpose?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3mJEaR0
via IFTTT

Laravel Multiple Select Old Value

i'm added multiple select box using bootstrap-select in create form everything goes very well but I've a problem in edit form .

I tried many way to get the old selected value but nothing works

Blade:

                                        <select class="selectpicker" name="students[]" data-style="select-with-transition" data-live-search="true" multiple title="Choose City" data-size="7">
                                        <option disabled> Multiple Options</option>
                                        @foreach($students as $student)
                                            <option value="" > </option>
                                        @endforeach
                                    </select>

Edit function:

 public function edit(Course $course)
{
    $students=Student::all();
    return view('course.edit',compact('course','students'));
}

Store Function:

public function store(Request $request)
{
    $request->validate([
        'name' => 'required',
    ]);
    $course = new Course;
    $course->name = $request->name;
    $course->teacher_id = $request->teacher_id;

    $course->save();
    $course->students()->sync($request->students);

    return redirect()->route('courses.index')
        ->with('success','Course created successfully.');
}

any idea to do this ??



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3mM5gqL
via IFTTT

Missing required parameters for [Route: claim_card] [URI: admin/claim_card/{giftcard_id}/{layout_id}/{user_id}/{color_id}]. - Laravel

I am new to laravel and when created a route, this error is displayed. I am passing complete parameters and can't locate the error.

Here's the route:

Route::get('/admin/claim_card/{giftcard_id}/{layout_id}/{user_id}/{color_id}' , 'UserController@claim_card')->name('claim_card');

Here's the function:

public function claim_card($giftcard_id , $layout_id , $user_id , $color_id)
{
    $card = giftcard_codes::where([['is_active', '=' , 1], ['giftcard_id', '=' ,$giftcard_id], ['layout_id', '=' ,$layout_id]])->first();
    if ($card) {
        $user = User::where('id', $user_id)->first();
        $lay = point_prizes::where('id', $layout_id)->first();
        if ($user->points >= $lay->points) {
            $us['points'] = $user->points - $lay->points;
            $c['is_active'] = 0;
            $co['color_id'] = $color_id;
            $co['is_pending'] = 2;

            cliaim_prizes_transactions::where([['user_id' , $user_id] , ['giftcard_id' , $giftcard_id] , ['layout_id' , $layout_id]])->first()->update($co);

                    $al = new user_alerts();
                    $al->user_id = $user_id;
                    $al->alert = 'Successfully Claimed Giftcard';
                    $al->alert_main = $card->code;
                    $al->save();

                    redeem__requests::where([['giftcard_id' , $giftcard_id] , ['layout' , $layout_id] , ['user_id' , $user_id] , ['is_active' , 1]])->first()->update($c);
                    giftcard_codes::where([['is_active', 1], ['giftcard_id', $giftcard_id], ['layout_id', $layout_id]])->orderby('id', 'DESC')->first()->update($c);
                    return view('admin.redeem_requests' , ['data' => redeem__requests::where('is_active' , 1)->get() , 'alert' => 'Giftcard Given Successfully']);
        }
    }
    else {
        return view('admin.redeem_requests' , ['data' => redeem__requests::where('is_active' , 1)->get() , 'alert' => 'No Code Exists']);
    }
}

Here's the view(where I am passing these):

<a href="">

Any help would be appreciated.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3hRuxw0
via IFTTT