Comments (3)
No, because itโs not UI scaffold package. You can make your views with custom design by using logs
table and model.
from laravel-user-activity.
No, because itโs not UI scaffold package. You can make your views with custom design by using
logs
table and model.
Alright, perfect thank you so much for your reply. :)
from laravel-user-activity.
In my case I just wanted a little css style customizing, so I copied vendor/haruncpi/laravel-user-activity/views/index.blade.php
file to views/vendor/LaravelUserActivity/index.blade.php
and replaced strings that I wanted to change.
And I created simple artisan command which copies and updates the vendor view file when the package has updated.
- make command
php artisan make:command CustomizeLaravelUserActivityView
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class CustomizeLaravelUserActivityView extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'custom:customize-laravel-user-activity-view';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Customize Laravel User Activity View index.php file';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$from = base_path('vendor/haruncpi/laravel-user-activity/views/index.blade.php');
$to = resource_path('views/vendor/LaravelUserActivity/index.blade.php');
$file = file_get_contents($from);
// page title tag
$file = str_replace(
"<title>User Activity</title>",
"<title>User Activity - {{ config('app.name') }}</title>",
$file);
// table td font size
$file = str_replace(
"table th,table td{padding:6px 6px;font-size:15px;color:#666}",
"table th,table td{padding:6px 6px;font-size:13px;color:#666;word-break:break-all;}",
$file);
$file = str_replace(
".changed{background:antiquewhite}",
".changed{background:antiquewhite;max-width: 500px;}",
$file);
// preview popup
$file = str_replace(
'<div class="popup" style="width: 60%">',
'<div class="popup" style="width: 90%">',
$file);
$file = str_replace(
"max-height:calc(100vh - 35%);overflow-x:hidden;overflow-y:scroll}",
"max-height:calc(100vh - 30%);overflow-x:hidden;overflow-y:scroll}",
$file);
file_put_contents($to, $file);
$this->info('LaravelUserActivity view file has customized successfully.');
}
}
- In
composer.json
register aspost-update-cmd
script.
...
"scripts": {
...
"post-update-cmd": [
...
"@php artisan custom:customize-laravel-user-activity-view"
...
]
...
}
...
Not the best or elegant way, but I`m satisfied with this. ๐
from laravel-user-activity.
Related Issues (20)
- Conflict with logs table
- Repository Pattern
- Display user-activity HOT 1
- column "name" does not exist and syntax error `where log_date < NOW() - INTERVAL $1 DAY`
- Logoff no log
- Have an error whit SQL Microsoft Server database. HOT 1
- can this work with spatie's activity log? HOT 1
- Doesn't work with SQLite HOT 1
- Is there any option to restore the records HOT 1
- Pagination not working
- Only showing loading screen. HOT 2
- Current Data not showing
- Please support non-standard App/User primary key HOT 1
- App\User not found HOT 2
- Larvel 8 Issue with Installing haruncpi/laravel-user-activity package
- Only insert changes to database saves space
- php artisan user-activity:install runs all migration files?
- No logs except login, password change and logout HOT 1
- Please add support for mongodb database connection. In your Activity Controller
- On Create not logged HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-user-activity.