Skip to content

Commit eecac07

Browse files
committed
standardized methods used in anyData and myData
added app.name and app.version config settings layouts.master now shows the app name and version in the title
1 parent 45bd7c0 commit eecac07

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

app/Http/Controllers/ClientsController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function anyData()
6060

6161
$dt = Datatables::of($clients)
6262
->addColumn('namelink', function ($clients) {
63-
return '<a href="clients/'.$clients->id.'">'.$clients->name.'</a>';
63+
return '<a href="'.route('clients.show', $clients->id).'">'.$clients->name.'</a>';
6464
})
6565
->addColumn('emaillink', function ($clients) {
6666
return '<a href="mailto:'.$clients->primary_email.'">'.$clients->primary_email.'</a>';

app/Http/Controllers/ContactsController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function myData()
102102

103103
$dt = Datatables::of($contacts)
104104
->addColumn('namelink', function ($contacts) {
105-
return '<a href="contacts/'.$contacts->id.'">'.$contacts->name.'</a>';
105+
return '<a href="'.route('contacts.show', $contacts->id).'">'.$contacts->name.'</a>';
106106
})
107107
->addColumn('emaillink', function ($contacts) {
108108
return '<a href="mailto:'.$contacts->email.'">'.$contacts->email.'</a>';

app/Http/Controllers/LeadsController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function anyData()
6767

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

9393
return Datatables::of($leads)
9494
->addColumn('titlelink', function ($leads) {
95-
return '<a href="leads/'.$leads->id.'">'.$leads->title.'</a>';
95+
return '<a href="'.route('leads.show', $leads->id).'">'.$leads->title.'</a>';
9696
})
9797
->editColumn('user_created_id', function ($leads) {
9898
return $leads->creator->name;

config/app.php

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
<?php
22

33
return [
4+
/*
5+
|--------------------------------------------------------------------------
6+
| Application Name and Version
7+
|--------------------------------------------------------------------------
8+
|
9+
| These values are used to display the application name and version.
10+
| Set APP_NAME in your ".env" file is you wish to use a custom name.
11+
|
12+
*/
13+
14+
'name' => env('APP_NAME', 'Flarepoint CRM'),
15+
'version' => ('1.3.7'),
16+
417
/*
518
|--------------------------------------------------------------------------
619
| Application Environment

resources/views/layouts/app.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta name="robots" content="noindex, nofollow">
8-
<title>FlarePoint</title>
8+
<title>{{ config('app.name') }}</title>
99

1010
<!-- Fonts -->
1111
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel='stylesheet'

resources/views/layouts/master.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<title>Flarepoint CRM</title>
5+
<title>{{ config('app.name') }} v{{ config('app.version') }}</title>
66
<link href="{{ URL::asset('css/jasny-bootstrap.css') }}" rel="stylesheet" type="text/css">
77
<link href="{{ URL::asset('css/font-awesome.min.css') }}" rel="stylesheet" type="text/css">
88
<link href="{{ URL::asset('css/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css">

0 commit comments

Comments
 (0)