Skip to content

Commit

Permalink
standardized methods used in anyData and myData
Browse files Browse the repository at this point in the history
added app.name and app.version config settings
layouts.master now shows the app name and version in the title
  • Loading branch information
jhuebel committed Aug 2, 2019
1 parent 45bd7c0 commit eecac07
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/ClientsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function anyData()

$dt = Datatables::of($clients)
->addColumn('namelink', function ($clients) {
return '<a href="clients/'.$clients->id.'">'.$clients->name.'</a>';
return '<a href="'.route('clients.show', $clients->id).'">'.$clients->name.'</a>';
})
->addColumn('emaillink', function ($clients) {
return '<a href="mailto:'.$clients->primary_email.'">'.$clients->primary_email.'</a>';
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ContactsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function myData()

$dt = Datatables::of($contacts)
->addColumn('namelink', function ($contacts) {
return '<a href="contacts/'.$contacts->id.'">'.$contacts->name.'</a>';
return '<a href="'.route('contacts.show', $contacts->id).'">'.$contacts->name.'</a>';
})
->addColumn('emaillink', function ($contacts) {
return '<a href="mailto:'.$contacts->email.'">'.$contacts->email.'</a>';
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/LeadsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function anyData()

return Datatables::of($leads)
->addColumn('titlelink', function ($leads) {
return '<a href="leads/'.$leads->id.'">'.$leads->title.'</a>';
return '<a href="'.route('leads.show', $leads->id).'">'.$leads->title.'</a>';
})
->editColumn('user_created_id', function ($leads) {
return $leads->creator->name;
Expand All @@ -92,7 +92,7 @@ public function myData()

return Datatables::of($leads)
->addColumn('titlelink', function ($leads) {
return '<a href="leads/'.$leads->id.'">'.$leads->title.'</a>';
return '<a href="'.route('leads.show', $leads->id).'">'.$leads->title.'</a>';
})
->editColumn('user_created_id', function ($leads) {
return $leads->creator->name;
Expand Down
13 changes: 13 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
<?php

return [
/*
|--------------------------------------------------------------------------
| Application Name and Version
|--------------------------------------------------------------------------
|
| These values are used to display the application name and version.
| Set APP_NAME in your ".env" file is you wish to use a custom name.
|
*/

'name' => env('APP_NAME', 'Flarepoint CRM'),
'version' => ('1.3.7'),

/*
|--------------------------------------------------------------------------
| Application Environment
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<title>FlarePoint</title>
<title>{{ config('app.name') }}</title>

<!-- Fonts -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel='stylesheet'
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/master.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flarepoint CRM</title>
<title>{{ config('app.name') }} v{{ config('app.version') }}</title>
<link href="{{ URL::asset('css/jasny-bootstrap.css') }}" rel="stylesheet" type="text/css">
<link href="{{ URL::asset('css/font-awesome.min.css') }}" rel="stylesheet" type="text/css">
<link href="{{ URL::asset('css/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css">
Expand Down

0 comments on commit eecac07

Please sign in to comment.