Category : laravel-4

i have maded and database that’s name is l6app and i have maked an table product_adds in this table i have save secondary id in array formate. now i am getting data behalf of arrays id using this Query in phpmyadmin saved data in database like [4,6,5,7,8,] SELECT * FROM tbl_product WHERE secondy_id IN (4, ..

Read more

I have a simple laravel project.I want to concatenate two string. $base_url ="https://image_base_url/"; $image_path = "/image_name.jpg"; $full_url=$base_url.$image_path; then I use full_url inside img tag like so in laravel in index.blade.php file <img src={{$full_url}} />; the full_url is correct but when it place in src it will get an ‘/’ at the end of it and ..

Read more

Below error, I’m getting while accessing web service call via postman Sybase DB, Call to undefined function AbramOdbcodbc_connect() Below configuration I applied; composer.json "require": { "php": "^7.2", "ext-curl": "*", "ext-json": "*", "abram/laravel-odbc": "dev-master", "agomez/laravel-odbc-driver": "^1.0", } database.php ‘sybase’ => [ ‘driver’ => ‘odbc’, ‘dsn’ => ‘*****’, ‘host’ => env(‘DB_HOST’,’*****’), ‘port’ => env(‘DB_PORT’,’*****’), ‘database’ => env(‘DB_DATABASE’), ..

Read more

I am Giving In web.php these routes Route::prefix(‘admin’)->group(function(){ Route::view(‘/’, ‘dashboard.admin’); Route::resource(‘posts’, ‘PostController’); Route::resource(‘profiles’, ‘UserProfileController’); Route::resource(‘user’, ‘UserController’); Route::resource(‘users’, ‘UsersController’); Route::resource(‘pages’, ‘PageController’); Route::resource(‘categories’, ‘CategoryController’); Route::resource(‘roles’, ‘RoleController’); Route::resource(‘productvalue’, ‘ProAttriConfigController’); }); all routes showing when i am hiting php artisan route:list but last route not showing –>productvalue Sourc..

Read more

I am getting error "message": { "business.name": [ "The business.name field is required." ] }, I am sending business.name in body, but still getting error. Why? This is my body { "business": { "name": "Hello", "gst": "07ARVPJ6970C1ZE" }, "firstName": "Ashish", "address": { "cityId": "707" } } my controller public function register(Request $request) { $this->customRequest = ..

Read more

I’m generating dynamic fields on view it can be any type of field @foreach($inputfields as $fields) @if($fields==1) {{ Form::input(‘fields[‘.$fields->name.’],$Val[‘value’]) }} @else .. .. other fields {{ Form::radio(‘fields[‘.$fields->name.’],$Val==$Val[‘value’] ? true : false) }} @endif @endforeach Issue is if i do not check the radio button then i am not able to get the value in the ..

Read more

I have dynamic fields which i want to validate, validation is also dynamic from database, foreach(…){ {{ Form::checkbox(‘input_checkbox[‘.$field_name.’],$value,in_array($value, $filedVal) ? true : false) }} .. } Now validation is working for textfields and dropdown but it is not working for checkboxes and radiobutton because when i have not checked the checkboxes or radio button it ..

Read more

it gives me this problem on this "deferred" part. Can you help me? I’m new. I wrote the whole code again. Can you help this time? Thank you. class ProviderRepository { protected function compileManifest($providers) { $manifest = $this->freshManifest($providers); foreach ($providers as $provider) { $instance = $this->createProvider($provider); //The problem starts right on this line! (deferred) if ..

Read more

I store the data correctly but when I try to get a data in edit function it shows me this error SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘staff.staff_id’ in ‘field list’ (SQL: select users.*, staff.staff_id as pivot_staff_id, staff.user_id as pivot_user_id, staff.staff_type as pivot_staff_type, staff.role as pivot_role, staff.created_at as pivot_created_at, staff.updated_at as pivot_updated_at from users ..

Read more

How can I get the room data from booking through roomAvailabilities table?? I tried using : $booking = Booking::all(); $booking-> RoomAvailability; //it works $booking -> Room; //doesnot work In booking model: public function room() { return $this->hasManyThrough(‘AppRoom’, ‘AppRoomAvailability’); } Sql Server query that might be similar to what I want: SELECT * FROM dbo.Booking as ..

Read more

$validator = Validator::make( Input::all(), [ ‘new_password’ => [ ‘required’, ‘password_reused’, ‘min:8’, ‘regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*(_|[^w])).+$/’ ], ‘confirm_new_password’ => ‘required|same:new_password’, ‘old_password’ => ‘required|hashmatch:password’, ], [ ‘confirm.different’ => Lang::get(‘account.password.errors.wrong_new_password’), ‘regex’ => Lang::get(‘account.password.errors.wrong_complexity’), ‘confirm.same’ => Lang::get(‘account.password.errors.wrong_confirm_password’), ‘hashmatch’ => Lang::get(‘account.password.errors.wrong_old_password’) ] ); $validator->fails() After fails function, I am getting "Illegal string offset ‘user_id’" and I am not sure why this is happening. ..

Read more