Category : html

I am using a html form to get user data using laravel php. On form submit I am executing an api which in Web.php is defined as Route::post(‘/register_user’, ‘[email protected]’); which executes, public function registerUser(Request $request){ $apiResult = $this->executeApi($request->input(‘mobile_no’)); if($apiResult === "Success"){ return view(‘further_view’); }else{ toastr()->error(‘Registration Failed. Please check mobile number.’); return back(); } } html ..

Read more

I am using laravel-7. I am making a job site,where applicant can upload resume (pdf) and company can view the pdf from laravel view page. I uploaded the file successful. But I am unable to view the pdf in view page. code: <td> {{$applicant_details->resume }} <iframe src="{{asset(‘resume/’.$applicant_details->resume) }}" width=”100%” height=”100%”> This browser does not support ..

Read more

I am trying to validate user registration form using Laravel Validator::make. The code works, including showing the error messages in the respective fields. But my problems are :- 1) No matter what I type in the email field, it always produces an error. So, it does not redirects me to the next page, even if ..

Read more

I have to put images in my PDF, however the images cannot display, instead it display like image not found or type unknown There are two images that have to display: from public directory /default.png from Voyager settings Voyager::image(setting(‘admitcard.signature’)) Below are my code: $pdf = PDF::setOptions([‘isHtml5ParserEnabled’ => true, ‘isRemoteEnabled’ => true])->loadView(‘pdf’, compact(‘data’))->stream(); return $pdf->download($data->name.’-admit-card.pdf’); If ..

Read more

*VendorController*- *this is the datatable function* public function datatable(){ $data = Vendor::all(); try { return DataTables::of($data)->addColumn(‘action’, function ($data) { $url_edit = url(‘master/vendor/’.$data->id.’/edit’); $url = url(‘master/vendor/’.$data->id.’/’); $view = "<a class=’btn btn-action btn-primary’ href=’$url’ title=’View’><i class=’nav-icon fas fa-eye’></i></a>"; $edit = "<a class=’btn btn-action btn-warning’ href=’$url_edit’ title=’View’><i class=’nav-icon fas fa-edit’></i></a>"; $delete = "<button data-url=’" . $url . "’ ..

Read more

i have an error.. it says: Undefined variable: posts (View: C:xampphtdocsdinsospermasdesbansusresourcesviewsadminpostsindex.blade.php) it works in home.blade.php like this: @foreach ($posts as $post)     <div class="card mb-4">         <img class="card-img-top" src="{‌{filter_var($post->post_image, FILTER_VALIDATE_URL) ? $post->post_image : ‘/storage/’ . $post->post_image}}" alt="Card image cap">         <div class="card-body">         <h2 class="card-title">{‌{$post->title}}</h2>         <p class="card-text">{‌{Str::limit($post->body, ’50’, ‘….’)}}</p>         <a href="{‌{route(‘post’, $post->id)}}" class="btn btn-primary">Read More &rarr;</a>         </div>         <div class="card-footer text-muted">         Posted on {‌{$post->created_at->diffForHumans()}} by         <a href="#">{‌{$post->name}}</a>         </div>     </div>     @endforeach but didn’t work in admin/posts/index.blade.php like this:   @foreach($posts as $post)                       <tr>                           <td>{‌{$post->id}}</td>                           <td>{‌{$post->title}}</td>                           <td>                             <img height="40px" src="{‌{filter_var($post->post_image, FILTER_VALIDATE_URL) ? $post->post_image : ‘/storage/’ . $post->post_image}}">                           </td>                           <td>{‌{$post->created_at->diffForHumans()}}</td>                           <td>{‌{$post->updated_at->diffForHumans()}}</td>                       </tr>                       @endforeach this is PostController.php: class PostController extends Controller { ..

Read more

I am using bootstrap 4 I’m using this syntax in my code: <a class="btn popovers" href="#" data-toggle="popover" data-placement="top" data-content="test content <a href=” title=’test add link’>link on content</a>" data-original-title="test title"> <div class="ui-bullet"></div> <strong>Booth 1</strong> </a> but the <a> tag still showed like this: is there anything wrong with my code? Sourc..

Read more

I am having a problem with accessing images I tried accessing image at public/storage/images with database seeder, and it works well like this: but if i try accessing image using "create post from admin", it didn’t work. like this: this my code: PostController.php public function store(){ $inputs = request()->validate([ ‘title’=>’required|min:8|max:255’, ‘post_image’=>’file’, //mime: jpeg, png ‘body’=>’required’ ..

Read more

Please for help I have code like this: <label>place</label> <select class="form-control" name="provice" id="provice"> <option value="0">test</option> @foreach ($provincees as $key => $value) <option value="{{ $value->id }}">{{ $value->name }}</option> @endforeach </select> I want to get the data name and insert to database, province name searched by using the id found in the select option This is to ..

Read more

i wanted to make a simple dropdown and it will show the value of the clicked dropdown item, <div class="dropdown"> <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" onclick=> Pilih Rumus </button> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <a class="dropdown-item" id="tabung" name="tabung" href="#" value="tabung">Volume Tabung</a> <a class="dropdown-item" id="bola" name="bola" href="#" value="bola">Volume Bola </a> <a class="dropdown-item" id="kerucut" name="kerucut" ..

Read more

i want to use a function (@lang) inside another function (@sortablelink). @lang: changed localisation depending on previous user input @sortablelink: kysliks sortable columns (https://github.com/Kyslik/column-sortable) Like this: @foreach($COLUMNS_TASK as $column => $val) <div class="th"> <a href=""><p class="justify-content-center text-center">@sortablelink($val, @lang(‘lang.’.$val))</p></a> </div> @endforeach When i run this code, i am getting this error: Error Call to undefined function ..

Read more

I’am using a step by step wizard jquery from dore templates, its pretty easy but when a put another label form he comes out of the card here is the source code:` <div id="step-0" class="card-body"> <form id="form-step-0" class="tooltip-label-right" novalidate> <div class="form-group position-relative error-l-100"> <label for="email">Email address</label> <input type="email" class="form-control" name="emailValidation" id="emailValidation" placeholder="Your email address" required> ..

Read more

Route::group([‘middleware’ =>’auth’], function(){ Route::prefix(‘/user/’)->group(function(){ Route::get(‘galleries/create’, [GalleryController::class, ‘gallerycreate’])->name(‘galleryCreate’); Route::post(‘galleries/store’, [GalleryController::class, ‘gallerystore’])->name(‘galleryStore’); }); <div class="card-header">Create New Gallery</div> <div class="card-body"> <form action=" {{ route(‘galleryStore’) }}" method="POST" enctype="multipart/form-data"> {{ csrf_field() }} @csrf <div class="row"> <div class="col-md-12"> <label for="description">Gallery Description</label> <textarea name="description" rows="3" class="form-control"></textarea> </div> </div> <br> <button class="btn btn-primary" type="submit">Create Gallery</button> </form> </div> Sourc..

Read more