添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • where in condition codeigniter
  • Codeigniter is giving me an error called "Disallowed Key Characters."
  • Captcha not showing up Codeigniter & Tank_Auth
  • Codeigniter 2.1 switch_uri() and i18n language library
  • Removing index.php in codeigniter xampp for windows
  • PHP extensions not working from web directory while .html extension is
  • Update rest of data in codeigniter import xls file
  • how do i access these array keys as a variable in CI?
  • codeigniter pagination with join table
  • Results of a query in CodeIgniter
  • joomla

  • Joomla sql query usling NOT LIKE
  • Joomla xcache authentication error
  • Mysql search two fields and prioritize results with matches on one of the fields
  • Display image over top of all DIV sections on page
  • Joomla - Global Configuration freeze and can't save or edit articles
  • Mysql connection timeout issue
  • PHP string operation - strip .jpg extension
  • Module assigned in joomla page does not appear
  • joomla multiple custom fields using xml
  • Joomla Custom Content Not Saving
  • laravel

  • Server requirements for PHP version
  • Uncaught ReflectionException: Class log does not exist in /vendor/laravel/framework/src/Illuminate/Container/Container.php:738
  • Laravel - how to delete polymorphic relations of model with belongsTo relation?
  • Using Eloquent ORM from Laravel 4 outside of Laravel
  • Having with parentheses in Laravel Query Builder
  • Should I commit css and js generated by laravel mix?
  • 2 condition in 1 where clause in Laravel Builder
  • Laravel 5.2 - Login with only Email
  • Laravel 5.2.11, sessions are not working, session cookie not being set
  • Laravel Authentication - Email in different table
  • actually you are passing array by using pluck

       $userId = User::where('mf_branch_id', $permitbranchId)->pluck('id');
    

    it returns the array like this (key is the index of the item. auto incremented value):

    1 => "name1", 2 => "name2", 100 => "name100"

    try it by using first() if you are fetching single record or if its multiple ID's then use whereIn Here

     $permit_report = WorkPermit::whereIn('user_id', $userId)->get();
    

    if single Record

         $userId = User::where('mf_branch_id', $permitbranchId)->firstOrFail();
         $permit_report = WorkPermit::where('user_id', $userId->id)->get();
                                            

    pluck() method returns an array, change your code :

    $userId = User::where('mf_branch_id', $permitbranchId)->firstOrFail();
    $permit_report = WorkPermit::where('user_id', $userId->id)->get();
                                        

    More Answer

  • SQLSTATE[HY000]: General error: 2031 (SQL: select * from `work_permits` where `user_id` = ?) using laravel
  • SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select * from `songs` where `id` = 5 limit 1)
  • Laravel: how to populate a blade SELECT with values from a where statement
  • Connection refused SQL: select * from information_schema.tables where table_schema = firstdb and table_name = migrations and table_type = 'BASE TABLE
  • Laravel5 Eloquent select from multiple table with where clause
  • Laravel valet secure does not work and where is nginx information coming from after deletion?
  • (2/2) QueryException SQLSTATE[HY000] [1049] Unknown database 'homestead' (SQL: select count(*) as aggregate from `users` where `email` =
  • Select from table where both columns have same value
  • How to fix SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `categories` where `enable` = 1) on Laradock?
  • Column not found: 1054 Unknown column 'users.blog_id' :SQL: select * from `users` where `users`.`blog_id` = 1 and `users`.`blog_id` is not null
  • could not find driver (SQL: select * from information_schema.tables where table_schema = fireflyiii and table_name = migrations)
  • Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select count(*) as aggregate from `item` where `barcode` = A002 and `id` <> 12)
  • How to fix 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select * from `users` where `id` = 0 limit 1)'
  • SQLSTATE[HY000] [2002] No such file or directory (SQL: select count(*) as aggregate from `users` where `email` = [email protected])
  • Saving Model in Laravel does not work - SQL Error column has no default value
  • Select from table where column in select from another table in laravel
  • SQL select show table if not same value from another table (Laravel)
  • I tried using postgresql on laravel but got could not find driver (SQL: select * from "users" where "id" = 4 limit 1)
  • laravel SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from `sessions` where `id` =
  • QueryException: General error: 1 no such table: {table_name} (SQL: select * from "{table_name}")
  • Laravel 7 Eloquent models - (not being able to do where outside table) Unable to find column on businessDeveloper.user_id, select * from opportunities
  • Sql select * from `categories` inner join `category_product` on `categories`.`id`
  • Laravel Eloquent - Select with join where column text like column text from other table
  • SQL error 'No such file or directory' when connecting from Laravel PHP in AppEngine
  • Laravel [QUERY] how to select contents from table 1 where condition must meet in table 2 and table 3
  • How can delete whitespaces from object in sql to check some condition using where
  • Retrieving data from server to local return SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user
  • Any way to force Mysql to use column from select in where clause when column is ambiguous?
  • SQL query return data where author is selected from array
  • Combining different select sum queries with different where from same table (Laravel way)
  • More answer with same ag

  • target="_blank" keep downloading image instead opening other page
  • Laravel 4 - Understanding models
  • Using DRY principle in Laravel Blade Template
  • How to pass data from child to parent in vue
  • Why is gulp not available in Laravel 6 for production version?
  • What is the best practice to create a custom helper function in php Laravel 5?
  • SQL LEFT JOIN using WHERE condition
  • How to unit test model method that calls method on another model in Laravel
  • Laravel Forge: How to stop queue workers?
  • General Approach to child data and foreach with set number of columns
  • How to fix Call to undefined method Maatwebsite\Excel\Excel::create()?
  • Eloquent query to LIKE query
  • Sorting arrays and comparing array values php
  • the validate on a folder repository
  • Laravel 5 GET inside controller?
  • Laravel | OrderBy related table's column in half-assembled builder
  • Laravel 4: Passing variable in route
  • How to make resend email link function in Laravel
  • laravel 6 - task schedule withoutOverlapping still overlapp with heroku
  • How do I send multiple id to controller
  • Arrange the display of foreach loop like a list
  • How to send Multiple mail Using laravel?
  • Laravel - Load different .env file
  • why laravel application is not starting properly?
  • Laravel PHPUnit PhpStorm Docker connection
  • How to get data which has expiry date nearest to current date?
  • How to network 2 separate docker containers to communicate with eachother?
  • Conditions for a search form
  • Laravel Base table or view not found
  • Laravel Stripe checkout: 419 (unknown status)
  •