How To add new Pages/Routes in MP3 Converter Pro

1) How To add a new Page like "domain.com/youtube-to-mp3" that displays the homepage?

  • Open "routes/web.php"find the relevant code below, and then add a new Route (as per the code in red text): 

    Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']], function ()
    {   /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
      Route::get('/', function ()   {
        // Block Website iframes header("X-Frame-Options: DENY");

        return view('homepage.index'); });

    // Add your new Route here
      Route::get('/youtube-to-mp3', function ()   {
        // Block Website iframes header("X-Frame-Options: DENY");

        return view('homepage.index'); });
    });
  • Open "resources/views/components/navbar.blade.php", find the relevant code below, and then add a new Page to the Navbar (as per the code in red text):

    <div class="navbar-center hidden md:flex">
      <ul class="menu menu-horizontal p-0">
        <li><a href="/">Home</a></li>

        <li><a href="/youtube-to-mp3">YouTube to MP3</a></li>
        @if (app(ApiDocSettings::class)->button || app(ApiDocSettings::class)->widget || app(ApiDocSettings::class)->json)
         <li><a href="/developers">Developers</a></li>
        @endif
       </ul>
    </div>

    In the same file, also add a new Page to the Mobile Navbar (as per the code in red text):

    <ul tabindex="0"
    class="text-neutral menu menu-compact dropdown-content mt-3 p-2 shadow bg-base-100 rounded-box w-52">
    <li><a href="/">Home</a></li>
    <li><a href="/youtube-to-mp3">YouTube to MP3</a></li>
    @if (app(ApiDocSettings::class)->button || app(ApiDocSettings::class)->widget || app(ApiDocSettings::class)->json)
    <li><a href="/developers">Developers</a></li>
    @endif
    </ul>

 

2) How To add a new, static Page like "domain.com/about" that displays a new, e.g., About page?

  • Navigate to "resources/views/homepage"create a new file (e.g., "about.blade.php"), and then add the following content to the new Page:

    <x-app-layout>
    <x-navbar></x-navbar>
    <div class="min-h-screen pt-16 overflow-hidden hero bg-gradient-to-br from-info-content to-accent">
    <div class="card max-w-7xl bg-base-100 shadow-xl mx-2">
    <div class="card-body">
    <h2 class="card-title">About</h2>
    <p>YOUR CONTENT HERE!</p>
    </div>
    </div>
    </div>
    <x-footer></x-footer>
    </x-app-layout>
  • Open "routes/web.php"find the relevant code below, and then add a new Route (as per the code in red text): 

    Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']], function ()
    {   /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
      Route::get('/', function ()   {
        // Block Website iframes header("X-Frame-Options: DENY");
        return view('homepage.index'); });

    // Add your new Route here
      Route::get('/about', function ()   {
        // Block Website iframes header("X-Frame-Options: DENY");
        return view('homepage.about'); });
    });
  • Open "resources/views/components/navbar.blade.php", find the relevant code below, and then add a new Page to the Navbar (as per the code in red text):

    <div class="navbar-center hidden md:flex">
      <ul class="menu menu-horizontal p-0">
        <li><a href="/">Home</a></li>

        <li><a href="/about">About</a></li>
        @if (app(ApiDocSettings::class)->button || app(ApiDocSettings::class)->widget || app(ApiDocSettings::class)->json)
         <li><a href="/developers">Developers</a></li>
        @endif
       </ul>
    </div>

    In the same file, also add a new Page to the Mobile Navbar (as per the code in red text):

    <ul tabindex="0"
    class="text-neutral menu menu-compact dropdown-content mt-3 p-2 shadow bg-base-100 rounded-box w-52">
    <li><a href="/">Home</a></li>
    <li><a href="/about">About</a></li>
    @if (app(ApiDocSettings::class)->button || app(ApiDocSettings::class)->widget || app(ApiDocSettings::class)->json)
    <li><a href="/developers">Developers</a></li>
    @endif
    </ul>

 

That's it!

 

So, if you added both kinds of pages (as per #1 and #2 in the previous list), then your modified files should look like the following:

 

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How To install MP3 Converter Pro on Plesk

Requirements # Recommended Server VPS, Cloud, or Dedicated (Get 20€ Free...

How To install MP3 Converter Pro on aaPanel (recommended)

Requirements # Recommended Server VPS, Cloud, or Dedicated (Get 20€ Free...

How To install MP3 Converter Pro (Update v3.0.5-beta5) on aaPanel (recommended)

Requirements # Recommended Server VPS, Cloud, or Dedicated (Get 20€ Free...