Is this on your dev machine? Do you see the route in php artisan route:list
Cannot access into laravel telescope dashboard
I have a laravel application where i am also using vue js. Can i use laravel's debug tool such as telescope there? I have already tried to install. Its installed and storing the logs properly in DB. But the problem is whenever i visit /telescope it shows me nothing which is making sense because i dont have any route path like that in my vue router. Is there any way to access telescopes dashboard? or i am not making sense at all?
@Sinnbeck yeah its in local machine. I see telescope routes available in my server when i run php artisan route:list
@shihab_jamil ok when you visit the route, do you see anything? Or just a white screen? Is there errors in the browser console?
@Sinnbeck no errors. when i visit /telescope it returns and errors page which i have defined in my vue router. in my vue router i have defined if the url is not matching any of my existing router then i will show him a custom 404 page. Even if i comment out that it only redirect to my app but shows nothing like telescope dashboard
@shihab_jamil Strange. When I use it, it is registered before my wildcard routes in web.php. Can you show your web.php just so I can see if I can spot anything?
web.php
Route::get('/', function () { return view('index'); });
Route::get("{any?}", function () { return view('index'); })->where('any', '.*');
vue_router
import { createRouter, createWebHistory } from "vue-router"; import Dashboard from "../views/Dashboard.vue"; import Employees from "../views/Employees.vue"; import Login from "../views/Login.vue"; import NotFound from "../Components/NotFound.vue"; import Profile from "../views/Profile.vue"; import ChangePassword from "../views/ChangePassword.vue"; import EmployeeProfile from "../views/EmployeeProfile.vue";
const routes = [ { path: "/", name: "Home", component: Dashboard, }, { path: "/dashboard", name: "Dashboard", component: Dashboard, }, { path: "/employees", name: "Employees", component: Employees, }, { path: "/login", name: "Login", component: Login, }, { path: "/profile", name: "Profile", component: Profile, }, { path: "/change-password", name: "Change Password", component: ChangePassword, }, { path: "/employee-profile/:id", name: "Employee Profile", component: EmployeeProfile, },
//catchall 404
{
path: "/:catchall(.*)",
name: "Not Found",
component: NotFound,
},
];
const router = createRouter({ history: createWebHistory("/"), routes, });
export default router;
@shihab_jamil No need to show the vue router as telescope has nothing to do with that. It is only php and laravel thats important here :)
@Sinnbeck :( just to be clear
@shihab_jamil Hehe thats ok :) I am just trying to see if I can find any reason for it. In my own version I know I changed the path in the telescope.php config file, but I dont think that is the problem.
Did you publish the assets? php artisan telescope:install
yeah i did.
@shihab_jamil Can you share your telescope.php config file?
config/telescope.php
@shihab_jamil You can just post the code by adding ```` on the line before and after it :)
"<?php
use Laravel\Telescope\Http\Middleware\Authorize; use Laravel\Telescope\Watchers;
return [
/*
|--------------------------------------------------------------------------
| Telescope Domain
|--------------------------------------------------------------------------
|
| This is the subdomain where Telescope will be accessible from. If the
| setting is null, Telescope will reside under the same domain as the
| application. Otherwise, this value will be used as the subdomain.
|
*/
'domain' => env('TELESCOPE_DOMAIN', null),
/*
|--------------------------------------------------------------------------
| Telescope Path
|--------------------------------------------------------------------------
|
| This is the URI path where Telescope will be accessible from. Feel free
| to change this path to anything you like. Note that the URI will not
| affect the paths of its internal API that aren't exposed to users.
|
*/
'path' => env('TELESCOPE_PATH', 'telescope'),
/*
|--------------------------------------------------------------------------
| Telescope Storage Driver
|--------------------------------------------------------------------------
|
| This configuration options determines the storage driver that will
| be used to store Telescope's data. In addition, you may set any
| custom options as needed by the particular driver you choose.
|
*/
'driver' => env('TELESCOPE_DRIVER', 'database'),
'storage' => [
'database' => [
'connection' => env('DB_CONNECTION', 'mysql'),
'chunk' => 1000,
],
],
/*
|--------------------------------------------------------------------------
| Telescope Master Switch
|--------------------------------------------------------------------------
|
| This option may be used to disable all Telescope watchers regardless
| of their individual configuration, which simply provides a single
| and convenient way to enable or disable Telescope data storage.
|
*/
'enabled' => env('TELESCOPE_ENABLED', true),
/*
|--------------------------------------------------------------------------
| Telescope Route Middleware
|--------------------------------------------------------------------------
|
| These middleware will be assigned to every Telescope route, giving you
| the chance to add your own middleware to this list or change any of
| the existing middleware. Or, you can simply stick with this list.
|
*/
'middleware' => [
'web',
Authorize::class,
],
/*
|--------------------------------------------------------------------------
| Allowed / Ignored Paths & Commands
|--------------------------------------------------------------------------
|
| The following array lists the URI paths and Artisan commands that will
| not be watched by Telescope. In addition to this list, some Laravel
| commands, like migrations and queue commands, are always ignored.
|
*/
'only_paths' => [
// 'api/*'
],
'ignore_paths' => [
'nova-api*',
],
'ignore_commands' => [
//
],
/*
|--------------------------------------------------------------------------
| Telescope Watchers
|--------------------------------------------------------------------------
|
| The following array lists the "watchers" that will be registered with
| Telescope. The watchers gather the application's profile data when
| a request or task is executed. Feel free to customize this list.
|
*/
'watchers' => [
Watchers\BatchWatcher::class => env('TELESCOPE_BATCH_WATCHER', true),
Watchers\CacheWatcher::class => [
'enabled' => env('TELESCOPE_CACHE_WATCHER', true),
'hidden' => [],
],
Watchers\ClientRequestWatcher::class => env('TELESCOPE_CLIENT_REQUEST_WATCHER', true),
Watchers\CommandWatcher::class => [
'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
'ignore' => [],
],
Watchers\DumpWatcher::class => [
'enabled' => env('TELESCOPE_DUMP_WATCHER', true),
'always' => env('TELESCOPE_DUMP_WATCHER_ALWAYS', false),
],
Watchers\EventWatcher::class => [
'enabled' => env('TELESCOPE_EVENT_WATCHER', true),
'ignore' => [],
],
Watchers\ExceptionWatcher::class => env('TELESCOPE_EXCEPTION_WATCHER', true),
Watchers\GateWatcher::class => [
'enabled' => env('TELESCOPE_GATE_WATCHER', true),
'ignore_abilities' => [],
'ignore_packages' => true,
],
Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', true),
Watchers\LogWatcher::class => env('TELESCOPE_LOG_WATCHER', true),
Watchers\MailWatcher::class => env('TELESCOPE_MAIL_WATCHER', true),
Watchers\ModelWatcher::class => [
'enabled' => env('TELESCOPE_MODEL_WATCHER', true),
'events' => ['eloquent.*'],
'hydrations' => true,
],
Watchers\NotificationWatcher::class => env('TELESCOPE_NOTIFICATION_WATCHER', true),
Watchers\QueryWatcher::class => [
'enabled' => env('TELESCOPE_QUERY_WATCHER', true),
'ignore_packages' => true,
'slow' => 100,
],
Watchers\RedisWatcher::class => env('TELESCOPE_REDIS_WATCHER', true),
Watchers\RequestWatcher::class => [
'enabled' => env('TELESCOPE_REQUEST_WATCHER', true),
'size_limit' => env('TELESCOPE_RESPONSE_SIZE_LIMIT', 64),
'ignore_http_methods' => [],
'ignore_status_codes' => [],
],
Watchers\ScheduleWatcher::class => env('TELESCOPE_SCHEDULE_WATCHER', true),
Watchers\ViewWatcher::class => env('TELESCOPE_VIEW_WATCHER', true),
],
];"
@shihab_jamil This is really strange. I just created a new project, and added this to web.php
Route::get("{any?}", function () { return view('index'); })->where('any', '.*');
I then installed telecope and tried visiting /telescope, and it just worked. Do you perhaps have some middlware or similar in your code that might give problems? Is the code on github so I can compare?
Can you perhaps try php artisan optimize:clear ?
@Sinnbeck i did that too
yeah, here is my repo "https://github.com/Shihabshako/Employee_Management_system-Laravel_vue.git"
@shihab_jamil Can you try ensuring that you are logged in, and add your email here? https://github.com/Shihabshako/Employee_Management_system-Laravel_vue/blob/master/app/Providers/TelescopeServiceProvider.php#L67
Nevermind. Its only for production :p
Any chance your .env has APP_ENV set to something other that local?
APP_ENV=local ... about the email, yeah i read that on docs :p
@shihab_jamil I just tested it. I had to run composer update to get it working. I then started it with php artisan serve and visited http://127.0.0.1:8000/telescope, which worked as expected.
did you run "npm run dev"
@shihab_jamil no. That shouldn't make a difference? Does it work if you access it without running that command?
Are you trying to access the vite url /telescope?
@Sinnbeck yeah
@shihab_jamil you need to use your normal url for the web site, not the vite url
@Sinnbeck how can i do that
@shihab_jamil if you use php artisan serve, take the url it gives you and add /telescope
@Sinnbeck okay. i stopped everything. reopen my projects. run php artisan serve then visit localhost:8000/telescope and shows me same thing -> Missing Vite Manifest File Did you forget to run npm install && npm run dev?
@shihab_jamil hmm very strange. Try composer update and try again
@Sinnbeck hey finally it worked. I used 3 commands for it composer update php artisan optimize php artisan optimize:clear
thanks for your tremendous response man , and nice dp btw :p
and now its also working in vite url as well
@shihab_jamil happy to help! Dp?
not at all . i have to run first php artisan serve and the i have to run npm run dev . if i dont do that it shows me that error
Missing Vite Manifest File
Did you forget to run npm install && npm run dev?
Please or to participate in this conversation.