Support the ongoing development of Laravel.io →
Configuration Requests Views
Last updated 1 year ago.
0

I'm on unfamiliar territory here, but try deleting/renaming the bootstrap/compiled.php file to start with.

It's created b running artisan optimize and just chucks all files into one to speed up loading etc.

If that doesn't make a difference, then I'd add the following to the top of app/routes.php:

Route::get('/', function(){
  return 'ok, routes.php seems to work';
});

That's a starting point at least.

Mei

Last updated 1 year ago.
0

Many thanks for the reply Mei, the compiled.php one is new to me, but that also had no success. I had thought I had tried the routes file being turned to basics - with no results, but doing that worked. So atleast I know that the basics of the framework are still functioning.

I will rebuild from here I guess, now that I know it works. Here was the original routes code (nothing hugely complex, but i'll have to deconstruct) +The /login route die was one of my failed attempts


$https = Config::get('app.ssl') ? 'https' : 'http';

Route::any('/', array('as' => 'home', $https, function()
{

	$app_text = require app_path().DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.Lang::getLocale().DIRECTORY_SEPARATOR.'app.php';

	return View::make('home')->with(array(
		'app_text' => json_encode($app_text)
	));
}));
Route::any('/login', array('as' => 'home', $https, function()
{
	die();
}));
Route::get('/manifest.appcache', array($https, function()
{
	$enable_appcache = !Config::get('app.debug');

	$manifest = $enable_appcache ? View::make('live_manifest')->render() : View::make('dev_manifest')->render();	

	$response = Response::make($manifest, '200');
	$response->headers->set('Content-Type', 'text/cache-manifest');
	$response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate');
	$response->headers->set('Pragma', 'no-cache');
	$response->headers->set('Expires', '0');

	return $response;
}));

Route::post('/api/login', array($https, function()
{
	$creds = array('password' => Input::get('password'));

	if (Auth::attempt($creds)) {
		Auth::login(new User);
		return Response::json(array(
			'Sectors' => Sector::all()->toArray(),
			'Benefits' => Benefit::all()->toArray(),
			'Fuels' => Fuel::all()->toArray(),
			'FuelBenefitRatings' => FuelBenefitRating::all()->toArray()
		));
	} else {
		return Response::json( array('errors' => true));
	}
}));

Last updated 1 year ago.
0

For anyone interested beyond myself.. it seems the issue was with declaration of https/http in this way, set up by my colleague. I'll be using another method to achieve SSL.

Route::get('/', array('as' => 'home', $https, function()

and also, this line - which I'm not sure of the correct term for this? Anyone? I'm trying to enable this method on our new server, would appreciate any input.. at the moment a workaround is being used.

(new LanguageSetter)->setLanguage();
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.