#### Category : backend

I have an issue with my project. I am passing the data through reactjs in the front end, but the value is not getting in the backend. Can anyone say what is the problem. $cert = new certificate;$val = Validator::make($req->all(),$cert->createRules); if ($val->fails()) { return response()->json($val->errors(), 422); } $cert->prize =$req->prize; $cert->name =$req->name; ..

I’m new to laravel and I’m facing a (I suppose) common problem, but couldn’t find this specific scenario in the documentation: I’m building a two language website and I’m filling HTML from a file in my langs folder. So I want to know how to make a proper for loop inside this code: <div class="carousel-item ..

I’m using Laravel for a site where most database objects can be private (i.e., viewed only by their owner) or public (viewed by everyone, including guests). Each of these has a user_id, which I set to NULL when the object is public. What’s the simplest way of authenticating routes for this scenario? For example, in ..

I’m ready to start a new project and I don’t know which Backend Framework I should choose. I will make an API that connects to React application. Actually I have known many languages like JavaScript, PHP, python and others and I have programmed with a backend frameworks like Django, NodeJS, Laravel and others. My question ..

I have a data structure like you can see in the picture above. I want some fields in the root collections, but I don’t know how can I can get that. public function index (Request $request) {$draw = $request->get(‘draw’);$start = $request->get(‘start’);$length = $request->get(‘length’);$order = Order::with(‘user’); $total_order =$order->count(); $orders = Order::with(‘user’)->offset($start)->limit($length)->get(); .. Read more I’m trying to make a query where returns me the results, based on a request word, but I have to filter with the relationship columns as well. Example: Payment::byUnity($unityId) ->with([‘contract:id,nome,sigla’]) ->latest(‘id’) ->where(‘id’, ‘LIKE’, ‘%’ . $request->input(‘search’) . ‘%’) ->orWhere(‘name’, ‘LIKE’, ‘%’ .$request->input(‘search’) . ‘%’) ->orWhere(‘contract.name’, ‘LIKE’, ‘%’ . $request->input(‘search’) . ‘%’) ->orWhere(‘contract.description’, ‘LIKE’, ‘%’ .. Read more I want to know how to use gasparesgangaphp-shapefile in laravel 8. I’ve already install it via composer using: composer require gasparesganga/php-shapefile but I don’t know how to call it in my controller to be abe to use ShapeFileReader() Sourc.. Read more I have been asked to use laravel and php as a backend and flutter for the front end but im not able to find any extensive Documentation. Help Reqd. Sourc.. Read more In Laravel documentation this middleware checks if the requests have a token with the name ‘my-secret-token’: public function handle($request, Closure $next) { if ($request->input(‘token’) !== ‘my-secret-token’) { return redirect(‘home’); } return $next($request); } What is this token in the HTTP requests? I looked in the HTTP RFC and tokens are mentioned but for a different ..

There is a textbox in frontend. Sends update request to backend when user pressed a button on keyboard. In a scenario that user wrote "Note to myself to remind later". He pressed to 30 keys. And sent 30 requests. If backend complete the 30th request before 29th request, the user input will be stored in ..

I am a beginner in web development. I have been learning React for a few months now. I like React and feel pretty comfortable with it. Now I would like to start learning the backend more because one of my goals is to become a full-stack freelancer. I have 2 goals that I would like ..

Hello I’m trying to learn laravel, and I got to the point where I stumbled upon this problem in templating where the content is not showing up when using @yeild it only shows the content of the main blade file and does not display the @section in the child here is my code below, what ..

**i have this ** public function definition() { return [ ‘feature’ => $this->faker->randomElement([‘A/C: Front’, ‘A/C: Rear’, ‘Backup Camera’, ‘Cruise Control’, ‘A/C: Front’, ‘A/C: Rear’, ‘Backup Camera’, ‘Cruise Control’, ‘Power Steering’, ‘Hands-Free’, ‘Heated Seats’, ‘Keyless Entry’, ‘Sunroof’, ‘Airbag: Driver’, ‘Airbag: Passenger’, ‘Fog Lights’, ‘Third Row Seats’, ‘Navigation’]), ]; } calling it like this <div class="row mt-3 .. Read more In this section, I want to use the Persian calendar, This form is for a component. What should I change? What should I write to show me this component of the Persian calendar? <div class="form-group "> <label for="date">date</label> <input id="date" name="date" class="form-control datepicker" type="text" value="{{ post.date }}"/> </div> enter image description here Sourc.. Read more **@foreach($posts as $post)** <div class="card"> <img class="card-img-top" src="…" alt="Card image cap"> <div class="card-body"> <h5 class="card-title">**{{$post->title}}**</h5> <p class="card-text">**{{$post->description}}**</p> <p class="card-text">**{{$post->price}}**</p> </div> </div> **@endforeach** i want to create 4 inline cards to display all post. (4 cards on each line) i tried to put the past code in <div class="card-group"> **here** </div> but res result is many ..
I am using google drive as the photo storage of the application after uploading, but I have trouble trying to get the image path after uploading. How can I get the link? This is my code upload $name =$request->file(‘thumbnail’)->getClientOriginalName(); $image=$request->file(‘thumbnail’)->storeAs(‘/’, $name, ‘google’); If i use Storage::disk(‘google’)->allFiles() . I get the following array [ .. Read more I Am Making Flutter App And I Want To Host The Back-end Made With Mysql And Laravel To Use The API Because Flutter Doesn’t Allow Localhost And I Don’t Know How To Upload The Back-End! And How Can I Take A Host … Sourc.. Read more I was dealing with an issue where my API site was not accessible either by my iOS app or by a web client. I fixed the issue and can now visit the API site via web client, but now am unable to login to my app, although I periodically (about every half hour strangely) am .. Read more So I have the following code in my blade file but I keep getting a certain error when it tries to read the variables from the backend. {!! (FALSE ===$planTier[‘element’][‘badge’] ? ” : "<div class=’pricing__badge-bg’></div> <div class=’pricing__badge-text’> <b> <span class = ‘content’> {!! $content[‘text’][‘UB5JeV’][‘displayText’] !!} </span> </b> </div>") !!} I keep seeing the following .. Read more home.php //controller <?php namespace AppHttpControllers; use IlluminateHttpRequest; class home extends Controller { public function index($home) { return view(‘home’,[‘home’=>$home]); } } web.php Route::get(‘home/{home}’,[home::class,’index’]); home.blade.php {{home}} ErrorException Use of undefined constant home – assumed ‘home’ (this will throw an Error in a future version of PHP) (View: C:UsersRASHEED1612Eprojectresourcesviewshome.blade.php) Sourc.. Read more I am trying to create a timer in laravel where you should click on a button and after that it should take the timer amount from the backend and start counting in the frontend. For example i have an item_1 which should have a timer of 5 minutes and an item_2 which should have a .. Read more I know reading this can take you a while but you can save me much much more time than letting me do these choices on my own. I tried to be so specific so that you know better my php programming knowledge. Here we go. I want to mention since I’m a Computer Science and .. Read more i’m using this way to store the image, is there another way to short this code, and what’s the best way when store the image and when update it, cuz this way when i use it to update, i got this error Call to a member function move() on null in laravel$file_extension = $request .. Read more I’m working on this project were I’m using Laravel 8 as my backend frame work and I have to make a self Join, I have tried out this code but it did not work -the first join is the one I tried but failed- : public function get_all_medical_centers(){$data= DB:: table(‘medicalcenters’) ->join(‘medicalcenters’,’medicalcenters.id’,"=",’medicalcenters.parent_id’) ->join(‘countries’,’medicalcenters.country_id’,"=",’countries.id’) ->join(‘states’,’medicalcenters.country_id’,"=",’states.id’) ->join(‘cities’,’medicalcenters.country_id’,"=",’cities.id’) ..