Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by nickkecooper

  1. Thank you! I will give this a shot, I was looking for the first option. I saw examples online on this but I was so lost on the fuction() within the query.
  2. It's a standard URL, I do not know all the accepted file types. However I've used both JPG and PNG with no issues. Try putting them into /public_html/assets/**YOUR CHOICE AFTER THAT**. Try going to the image once you upload it there. If you can reach it, place that URL into the Image URL input within the ranks page.
  3. Hey guys! I wanted to pick your brains about possibly getting the pireps to display based on the pilots hubs. I'd like to have it so you can go to a hub and see the pireps its filled. I am unsure how to do this the clean way! I know I can perform the following @if ($pirep->user->home_airport->icao == 'KCLT') In doing it this way I lose any pagination features as it's just filtering through already gathered data. Any thoughts would be appreciated!
  4. Maybe the newly created pilot needs to get assigned a rank? Try assigning a rank and see if that works!
  5. I did make sure all fillable items were listed in that section. I am also using the $request->all(), I know I could probably do something like $request->except('_token'); ? Thanks!
  6. That token is put there automatically by the Form::Open
  7. Fixed! Thank you Now when I do it the correct way on the create.blade.php, I get this error Column not found: 1054 Unknown column '_token'. Should I do an except command on my insert?
  8. {{ Form::model($staff, [ 'route' => ['staff::admin.update', $staff->id], 'method' => 'patch', 'id' => 'staffForm']) }} I made it this now. Still isn't working, saying it is undefined. I also changed the admin.php line to show what you had put. Maybe it is an issue with the modules.
  9. Under Modules/MyModule/Http/Routes/admin.php Route::post('staff/update{id}', 'AdminController@update');
  10. Once I removed the 'route' line it worked like a charm! Not sure how to fix the routes not registering under a module but I'm sure it'll come to me!
  11. Ill take a closer look. I can't use: {{ Form::model($airport, [ 'route' => ['admin.airports.update', $airport->id], 'method' => 'patch', 'id' => 'airportForm']) }} In a module. When I replace the route it does not like the route. I've tried a ton of things to get it to work but can't figure it out.
  12. I edited my post you were right he uses it lol sorry its late!
  13. Yea but it doesnt seem like the developer used the same format, and its driving me crazy how he got it to work lol The first solution you stated is the way he is doing it but I cant get it to work!
  14. Awesome thank you! Now how to fill in the input fields when you on an edit screen 🤨
  15. Thanks! Do you happen to know a good way to insert into the database? I'm lost after the form submits and does it's checks... not sure where the actual insert sql command is! 🤪 Figured that out. But having an issue on finding where findWithoutFail functions are stored.
  16. Hey does anyone have some knowedlge on getting a custom module to talk with the UserRepo? I created a module, added the Repo as it was add on the frontend users listing. But I am getting nothing. When I try to print the array it comes back as php memory exceeded, however I do not believe its a php memory issue. My code for the module controller is: <?php namespace Modules\Staff\Http\Controllers\Admin; use App\Contracts\Controller; use App\Models\Enums\UserState; use App\Repositories\Criteria\WhereCriteria; use App\Repositories\UserRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Log; use League\ISO3166\ISO3166; use Prettus\Repository\Exceptions\RepositoryException; /** * Class AdminController * @package Modules\Staff\Http\Controllers\Admin */ class AdminController extends Controller { private $userRepo; /** * @param UserRepository $userRepo */ public function __construct(UserRepository $userRepo) { $this->userRepo = $userRepo; } public function index(Request $request) { $where = []; if (setting('pilots.hide_inactive')) { $where['state'] = UserState::ACTIVE; } try { $this->userRepo->pushCriteria(new WhereCriteria($request, $where)); } catch (RepositoryException $e) { Log::emergency($e); } $users = $this->userRepo ->with(['airline', 'current_airport']) ->orderBy('pilot_id', 'asc'); return view('staff::admin.index', [ 'users' => $users, ]); } /** * Show the form for creating a new resource. */ public function create() { return view('staff::admin.create'); } /** * Store a newly created resource in storage. */ public function store(Request $request) { } /** * Show the specified resource. */ public function show() { return view('staff::admin.show'); } /** * Show the form for editing the specified resource. */ public function edit() { return view('staff::admin.edit'); } /** * Update the specified resource in storage. */ public function update(Request $request) { } /** * Remove the specified resource from storage. */ public function destroy() { } } Any help would be appreciated!
  • Create New...