#### Category : angular

I have product store function that get the $request and apply validators on it and return the errors or store successfully, when I run the function in Postman with empty data so I get all the errors well, but when I call the function from Angular I just get the image and price errors Laravel .. Read more I’m working with Angular 12 (frontend) and Laravel(backend). I’m sending the datas to the frontend with api. I want to get all users except one(authenticated) but it returns null. But the user seems to be logged in and also Auth::user() does not return null on other controllers. Where am I missing? It return null in .. Read more i am sending boolean type date from angular frontend to laravel backend and i am using FormRequest for data validation. here is the data i send from angular: {‘full_name’ : searchTerm,’is_search_friend’:true} FormRequest ‘full_name’ => ‘required|string|min:1|max:50’, ‘is_search_friend’ => ‘required|boolean’ i get this error : is_search_friend: [" is search friend must be true or false"] meanwhile i .. Read more Working on a small ionic framework application with laravel backend. Request from postman or browser works fine, but builds from Android’s getting 419 token mismatch error with same endpoints. Request Data from Android (error 419): Headers Accept application/json Accept-Encoding gzip, deflate Accept-Language en-AU,en-US;q=0.9,en;q=0.8 Authorization [Filtered] Content-Length 25 Content-Type application/json Host app.example.com Origin http://localhost Referer http://localhost/ .. Read more Working on a small ionic framework application with laravel backend. Request from postman or browser works fine, but builds from Android’s getting 419 token mismatch error with same endpoints. Request Data from Android (error 419): Headers Accept application/json Accept-Encoding gzip, deflate Accept-Language en-AU,en-US;q=0.9,en;q=0.8 Authorization [Filtered] Content-Length 25 Content-Type application/json Host app.example.com Origin http://localhost Referer http://localhost/ .. Read more I’m working with Laravel and Angular. I want to display the authenticated user’s data. I’m getting datas from Laravel with JSON and I’m using this code for the user datas. const headers = new HttpHeaders({ Authorization: Bearer${localStorage.getItem(‘token’)} }); this.http.get(‘http://127.0.0.1:8000/api/user’, {headers}).subscribe( result => (this.user = result, console.log(result)) ); It’s working but after a certain time ..

I have the following Angular code: <tr dir-paginate="item in file.messages | orderBy: orderByField: orderByReversed | itemsPerPage: 10: ‘fileMessages’" pagination-id="fileMessages"> <td>{{ item.id }}</td> <td>{{ item.created_at }}</td> <td><span data-ng-class="[‘label’, ‘label-‘ + item.type]">{{ item.type }}</span></td> <td>{{ item.message }}</td> </tr> Now the item.message contains some html which is coming from back end of the application which is in Laravel. ..

I try to open a login page inside of an ionic 5 application. To do so I use an iframe tag. It works on Android aswell as in firefox debugging. It is not working inside an ios simulator. It loads the page but as soon as i send the login credentials I get: 419 page ..

Hello community, I am stuck on how to add a role for multiple users and vice versa, to do a test, 1.I created my front-end with Angular which shows me the list of roles for each user and with Laravel I created an api with a crud for user and another for role in their ..

I am currently running a XAMPP server locally on my Windows machine. In the htdocs folder I have a Laravel 8 project for the backend and an Angular 11 project for the frontend. I’m trying to do this on a server but I really don’t know how to do it. After a long research I ..

In a project I am using Angular-12 as frontend and Laravel-8 as backend. Laravel: $employee = Employee::find($id); $employee->nationality_id =$request->nationality_id; $employee->state_id =$request->state_id ?? ”; $employee->city_id =$request->city_id ?? ”; $employee->save(); Angular: component: loadCountryData(event: any) { // this.profileInfoForm.patchValue({ state_id: null }); if (event) { this.country_id = event.id; this.cstatesService.getStatesByCountry(this.country_id).subscribe( (data) => { this.cstates = data.results.states; this.state_id .. Read more I’m trying to build a real-time notification system for my Angular/Laravel project. And it goes like that : the admin modify something in the database , the server side (laravel) instantly notify the user of that change in the client side(angular). I want to know how to approche this? Sourc.. Read more I am using Angular-12 as frontend and Laravel-8 as backend (api) for profile: Laravel backend: public function rules() { return [ ‘first_name’ => [ ‘required’, ‘string’, ‘max:50’ ], ‘last_name’ => [ ‘required’, ‘string’, ‘max:50′ ], ’employee_photo’ => [ ‘nullable’, ‘max:2048’ ], } public function addProfile(StoreProfileRequest$request) { $employee = new Employee();$employee->first_name = $request->first_name;$employee->last_name ..

i am working on ecommerce project with laravel and angular, i have products and brands for this products, in the function the i get the products with in laravel, i used nullable parameter like this public function index($brand = null) { if ($brand) { $products = Product::where(‘brand_id’, ‘=’,$brand)->get(); return response()->json($products); } else {$products ..

Hello i want to find the difference between these 2 dates. So as i understand, this is the code for angular getting current date. let currentDate = new Date(); and in the console log, the format is this. Fri Sep 03 2021 10:49:33 GMT+0800 but the other date that i retrieved from the database is ..

So here is my thought, can we create an App, with Laravel Backend and Angular frontend, where i can create new Angular Components via Laravel, and Update the Component for future edit. The Angular App, can be pushed into Bitbucket and Run an Angular build through CLI and Push the build to Amazon S3. ? ..

I am currently running a XAMPP server locally on my windows machine. In the htdocs folder I have a Laravel 8 project for backend and a Angular 11 project for the frontend. I am trying to deploy these to a server, but I really don’t know how to do that. After a long research I ..

iam working on Mobile shop Ecommerce full stack project and i have table for the brands and it’s five brands each brand have id, and the products table contain a column for the brand_id for each product, and i have a page to display all the products, in it i have list items for the ..

i have ecommerce project and i need to view the images of the products and i don’t know how to get it with angular and i wish anyone can help me the store function in laravel public function store(Request $request) {$validator = Validator::make(\$request->all(), [ ‘name’ => ‘required|string|max:100’, ‘display’ => ‘required|string|max:100’, ‘ram’ => ‘required|string|max:100’, ‘img’ ..

iam working with angular and laravel APIs on ecommerce project, when i try to create a new product via the API from postman and i upload the image and the data of the product it success and working well, but when i try this with angular ReActiveForms it doesn’t work, i assume that i made ..

I am trying to clean up my Laravel 5.3 route related files (web.php, api.php) in order to ensure certain parts and functions of my site are only accessible by admin user. I know Laravel 5.3 is a bit dated, but trying to figure out how pros would go about setting up routes to accomplish my ..

I’m trying to encrypt the request values using crypto.js from Angular and trying to decrypt in the backend from Laravel 8(php 7.4). But I’m not getting the expected output, getting different values when I decrypt the encrypted value. Codes are mentioned below. Frontend Angular code set() { var message = "52q6x93k4y"; var key = "6Le0DgMTAAAAANokdEEial" ..