Hi,
Yes, pretty much what @Demaestro said.
It's valid to retrieve the result of the builder, but I would not advise since you loose chain options later on.
Hi,
Yes, pretty much what @Demaestro said.
It's valid to retrieve the result of the builder, but I would not advise since you loose chain options later on.
Hi,
The double index.php hit is normal under the circumstances, once you enter .dev and second time you are being redirected to /en.
Please, explain the part about not finding it.
Thanks.
@pavsid ah lol, sry I thought it's still not working for you. Great that it does
@fredmj that is expected from Laravel to point your docroot to public folder of Laravel (Asgard). Good you solved that for yourself.
@pavsid So you are having this same issue when your project on a production server?
Unless you are using something strange to develop then no it should be fine as this. (For example windows lamp or anything like that).
@pavsid Just make a custom module, always try to restrain from editing core modules, so you don't have to worry about updating project.
Hey, @pavsid.
Yeah, this sux with Stylist HTMLbuilder there's good method that is protected
Here's helper function that can do whats protected:
// usage: relativeThemeAssetUrl('assets/css');
function relativeThemeAssetUrl($url)
{
$theme = \Stylist::current();
if ($theme) {
$themePath = $theme->getAssetPath();
$url = "themes/$themePath/$url";
return $url;
}
return false;
}
Hello, @rcorrino
You would probably want to split your logic into modules(on paper) - (most likely your logic already uses some namespace separation).
Then basically you would generate plain module (with entity names you already have) using scaffold command and insert your stuff 1 by 1.
There's no easy way just to drop in and go.
You should start on doing this then we can assist you with any details you are missing etc.
Thanks.
Hello,
So to register shortcut for presenter you would add it to config/menus.php
of laravel-menus
package.
<?php
return [
'styles' => [
'navbar' => \Nwidart\Menus\Presenters\Bootstrap\NavbarPresenter::class,
'navbar-right' => \Nwidart\Menus\Presenters\Bootstrap\NavbarRightPresenter::class,
'nav-pills' => \Nwidart\Menus\Presenters\Bootstrap\NavPillsPresenter::class,
'nav-tab' => \Nwidart\Menus\Presenters\Bootstrap\NavTabPresenter::class,
'sidebar' => \Nwidart\Menus\Presenters\Bootstrap\SidebarMenuPresenter::class,
'navmenu' => \Nwidart\Menus\Presenters\Bootstrap\NavMenuPresenter::class,
'my-custom_style' => \App\Presenters\ZurbMenuPresenter::class,
],
'ordering' => false,
];
After that you should be able to use it right away.
Try to clear caches and all that jazz.
I'm using multiple custom presenters myself and they are working just fine.
The default_menu_presenter
also works for me.
Default menuPresenter has this sorted, if you are using custom one please see default one for the part where it checks for this.
MenuPresenter - specifically setLocale
function and its usages.
Hey, @anardil06
Users object already have access to that information you don't need to explicitly retrieve that.
In your view
@foreach($users as $user)
{{ $user->name }}
@foreach ($user->roles as $role)
{{ $role->name }}
@endforeach
@endforeach
Hello, @kashifullahwebdeveloper .
I would suggest to you asking on issues of GitHub of that module about this.
I did a quick look at the module and you have no custom relationships defined there, so that could be possible PR to that repository. Otherways you would fork that module and make your own changes.
Other than that Asgard has little to do with that module
Thanks.
Hello @dsantacruz
If your database user has no password you actually need to type <none>
with greater and lesser signs.
If you enter nothing then system will use Laravel default password which is secret
Thanks.
I see where you are coming from, but relying on something that actually is available for your installation (version) will be most predictable, documentation as it usually is on open-source projects sometimes lack constant updates.
Being said that as I noted the open source, everybody can freely make a pull request with changes they would like to see in it.
Link to documentation repository
Hello, @Johnny.
There is no map of routes because that would be a nightmare to keep up with.
And in fact, there is no real need for that since you have powerful tools like artisan
.
Heres good command to get you started from command line php artisan route:list | grep Modules
that should give you all routes and even more (middleware etc.)
Modules load in this order:
order
attribute inside module.json
A
to come before Module B
As a general rule, i suggest you start your module order with index 2
and work up from there. Since default ordering is ASC
meaning 0
/A
is always first.
You can extend page-repository to your module, so whenever the application calls PageRepository it will get instances of your module where you can freely edit all BaseReposittory methods.
Basically, you need to
$this->app->extend(
'Modules\Page\Repositories\PageRepository',
function () {
$repository = new \Modules\PageExtender\Repositories\Eloquent\EloquentPageRepository(new \Modules\Page\Entities\Page());
if (! config('app.cache')) {
return $repository;
}
return new \Modules\PageExtender\Repositories\Cache\CachePageDecorator($repository);
}
);
And possibly you need to implement PageRepository interface in your PageRepository.
So that's that, hope you can make it work.
Currently, you can not overwrite Controller methods of Core modules.
What you can do is fork your own copy of Page module, then use that in composer as a Page module. This way you can do anything you like to that module and won't get overridden by updates.
Only thing is that you have to manually keep your fork up to date with AsgardPage.
Thanks for the suggestion, will look into it.
Hey @kay899,
Could you explain a bit more with an example?
Currently, Core does not enforce anything on your EloquentModels. You can override anything in your module repositories.
Thanks.