title: i'm having difficulty redirecting or pass data from my show.blade in licenseController to my FronendController index page in laravel 8
body: <pre><code>//FrontendController//
  
  namespace App\Http\Controllers\Frontend;
  use App\Models\Beat;
  use App\Models\License;
  use Illuminate\Http\Request;
  use App\Http\Controllers\Controller;
  
  class FrontendController extends Controller
  {
      public function index()
      {
          $beats = Beat::all();
          $popular_licenses = License::where('popular','1')-&gt;take(15)-&gt;get();
          return view('frontend.index', compact('popular_licenses', 'beats'));
      }
  }
  
  //LicenseController//
  
  &lt;?php
  
  namespace App\Http\Controllers\Admin;
  
  use App\Models\Beat;
  use App\Models\Genre;
  use App\Models\License;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\DB;
  use App\Http\Controllers\Controller;
  use Illuminate\Support\Facades\File;
  
  class LicenseController extends Controller
  {
      /**
       * Display a listing of the resource.
       *
       * @return \Illuminate\Http\Response
       */
      public function index()
      {
          $license = License::all();
          return view('admin.license.index', compact('license'));
      }
  
      /**
       * Show the form for creating a new resource.
       *
       * @return \Illuminate\Http\Response
       */
      public function create()
      {
          $genre = Genre::all();
          $beats = DB::select('select * from beats');
          return view('admin.license.create', ['beats'=&gt;$beats], compact('genre', 'beats'));
      }
  
      /**
       * Store a newly created resource in storage.
       *
       * @param  \Illuminate\Http\Request  $request
       * @return \Illuminate\Http\Response
       */
      public function store(Request $request)
      {
          $license = new License();
  
          if($request-&gt;hasFile('image'))
          {
              $path = 'assets/uploads/lisenses/img/'.$license-&gt;image;
              if(File::exists($path))
              {
                  File::delete($path);
              }
              $file = $request-&gt;file('image');
              $ext = $file-&gt;getClientOriginalExtension();
              $filename = time().'.'.$ext;
              $file-&gt;move('assets/uploads/licenses/img',$filename);
              $license-&gt;image = $filename;
          }
  
          if($request-&gt;hasfile('audio'))
          {
              $path = 'assets/uploads/lisenses/audio/'.$license-&gt;audio;
              if(File::exists($path))
              {
                  File::delete($path);
              }
              $file = $request-&gt;file('audio');
              $extention = $file-&gt;getClientOriginalExtension();
              $filename = time().'.'.$extention;
              $file-&gt;move('assets/uploads/licenses/audio',$filename);
              $license-&gt;audio = $filename;
          }
  
          $license-&gt;beat_id = $request-&gt;input('beat_id');
          $license-&gt;license_name = $request-&gt;input('license_name');
          $license-&gt;beat_name = $request-&gt;input('beat_name');
          $license-&gt;genre = $request-&gt;input('genre');
          $license-&gt;bpm = $request-&gt;input('bpm');
          $license-&gt;key = $request-&gt;input('key');
          $license-&gt;tag_1 = $request-&gt;input('tag_1');
          $license-&gt;tag_2 = $request-&gt;input('tag_2');
          $license-&gt;time = $request-&gt;input('time');
          $license-&gt;price = $request-&gt;input('price');
          $license-&gt;status = $request-&gt;input('status') == True ? '1':'0';
          $license-&gt;popular = $request-&gt;input('popular') == True ? '1':'0';
          $license-&gt;wav = $request-&gt;input('wav')  == True ? '1':'0';
          $license-&gt;trackout = $request-&gt;input('trackout')  == True ? '1':'0';
          $license-&gt;unlimited = $request-&gt;input('unlimited')  == True ? '1':'0';
          $license-&gt;exclusive = $request-&gt;input('exclusive')  == True ? '1':'0';
          $license-&gt;save();
          return redirect('licenses')-&gt;with('status',&quot;License Added Successfully&quot;);
      }
  
      /**
       * Display the specified resource.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function show($id)
      {
          $licenses = License::where('beat_id', $id)-&gt;get();
  
          return view('admin.license.show')-&gt;with('licenses', $licenses);
      }
  
      /**
       * Show the form for editing the specified resource.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function edit($id)
      {
          $genre = Genre::all();
          $beat = Beat::find($id);
          $license = License::find($id);
          return view('admin.license.edit', compact('license', 'beat', 'genre'));
      }
  
      /**
       * Update the specified resource in storage.
       *
       * @param  \Illuminate\Http\Request  $request
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function update(Request $request, $id)
      {
          $license = new License();
          if($request-&gt;hasFile('image'))
          {
              $file = $request-&gt;file('image');
              $ext = $file-&gt;getClientOriginalExtension();
              $filename = time().'.'.$ext;
              $file-&gt;move('assets/uploads/licenses/img',$filename);
              $license-&gt;image = $filename;
          }
          if($request-&gt;hasfile('audio'))
          {
              $file = $request-&gt;file('audio');
              $extention = $file-&gt;getClientOriginalExtension();
              $filename = time().'.'.$extention;
              $file-&gt;move('assets/uploads/licenses/audio',$filename);
              $license-&gt;audio = $filename;
          }
          $license-&gt;beat_id = $request-&gt;input('beat_id');
          $license-&gt;license_name = $request-&gt;input('license_name');
          $license-&gt;beat_name = $request-&gt;input('beat_name');
          $license-&gt;genre = $request-&gt;input('genre');
          $license-&gt;bpm = $request-&gt;input('bpm');
          $license-&gt;key = $request-&gt;input('key');
          $license-&gt;tag_1 = $request-&gt;input('tag_1');
          $license-&gt;tag_2 = $request-&gt;input('tag_2');
          $license-&gt;time = $request-&gt;input('time');
          $license-&gt;price = $request-&gt;input('price');
          $license-&gt;status = $request-&gt;input('status') == True ? '1':'0';
          $license-&gt;popular = $request-&gt;input('popular') == True ? '1':'0';
          $license-&gt;wav = $request-&gt;input('wav')  == True ? '1':'0';
          $license-&gt;trackout = $request-&gt;input('trackout')  == True ? '1':'0';
          $license-&gt;unlimited = $request-&gt;input('unlimited')  == True ? '1':'0';
          $license-&gt;exclusive = $request-&gt;input('exclusive')  == True ? '1':'0';
          $license-&gt;save();
          return redirect('licenses')-&gt;with('status',&quot;License Updated Successfully&quot;);
      }
  
      /**
       * Remove the specified resource from storage.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function destroy(License $license)
      {
          $license-&gt;delete();
  
          return redirect('licenses')-&gt;with('status',&quot;License Dleleted Successfully&quot;);
      }
  }
  
  
  //Route//
  
  Route::get('/', [FrontendController::class, 'index']);
  
  Auth::routes();
  
  Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])-&gt;name('home');
  
  Route::middleware(['auth', 'isAdmin'])-&gt;group(function () {
      Route::resource('dashboard', '\App\Http\Controllers\Admin\FrontendController');
      Route::resource('genres', '\App\Http\Controllers\Admin\GenreController');
      Route::resource('beats', '\App\Http\Controllers\Admin\BeatController');
      Route::resource('licenses', '\App\Http\Controllers\Admin\LicenseController');
  });
  
  
  //show.blade.php//
      &lt;div class=&quot;container&quot;&gt;
      @foreach($licenses-&gt;chunk(4) as $license)
      &lt;div class=&quot;card&quot;&gt;
          &lt;div class=&quot;card-body&quot;&gt;
              @foreach($licenses as $license)
                  &lt;div class=&quot;&quot;&gt;
                      &lt;img src=&quot;{{ asset('assets/uploads/licenses/img/'.$license-&gt;image) }}&quot; style=&quot;height:50px;width:50px;&quot; alt=&quot;image here&quot;&gt;
                      &lt;p&gt;{{ $license-&gt;popular }}&lt;/p&gt;
                      &lt;p&gt;{{ $license-&gt;beat_name }}&lt;/p&gt;
                      &lt;p&gt;{{ $license-&gt;license_name}}&lt;/p&gt;
                  &lt;/div&gt;
              @endforeach
          &lt;/div&gt;
      &lt;/div&gt;
      @endforeach
  &lt;/div&gt;
  </code></pre>
  <p>Please help, i have a FrontendController, which is where my homepage(index) points to but BeatController, LicenseController and GenreController, points my admin dashboard, now i ran into a problem when i want to view the show.blade.php in licenseController to my FrontendController ie. my home page using a bootstrap modal. but it working when i return the view to its orinal route.</p>